tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] swapcontext vs libpthread



On Aug 25,  9:10am, manu%netbsd.org@localhost (Emmanuel Dreyfus) wrote:
-- Subject: Re: [PATCH] swapcontext vs libpthread

| On Sat, Aug 25, 2012 at 03:10:51AM -0400, Christos Zoulas wrote:
| [Call a C function from hppa assembly]
| > Yes, that loads the address to %1, you'll need to call afterwards.
| 
| It seems to be done with "bv,n    %r0(%r1)". I understand bv
| is branch-something, %r1 makes sense, but I am not sure about %r0.

Typically %r0 == 0 on RISC...

| I would have something like this:
| 
| #ifdef PIC
|         ldw     HPPA_FRAME_EDP(%sp), %r19
|         addil   LT%_C_LABEL(setcontext), %r19
|         ldw     RT%_C_LABEL(setcontext)(%r1), %r1
| #else
|         ldil    L%_C_LABEL(setcontext), %r1
|         ldo     R%_C_LABEL(setcontext)(%r1), %r1
| #endif
|         bv,n    %r0(%r1)
| 

I am not that familiar with PA-RISC assembly, but I guess the tests
will fail if this is incorrect :-)

| I will prepare a patch with all libc proposed changes in about 
| 18 hours.

Sounds good.

christos


Home | Main Index | Thread Index | Old Index