[parisc-linux] Fwd: hppa glibc clone() patch proposal (3/3)
Joel Soete
soete.joel at tiscali.be
Fri Apr 7 07:12:54 MDT 2006
Hello Randolph, Carlos,
Just comeback to you for just a small detail:
> Some comments:
>
[snip]
>
> Here, I think you want to do (or inline the __syscall_error logic):
[snip]
about this 'inline __syscall_error logic', I found in
sysdeps/unix/sysv/linux/hppa/sysdep.h:
[snip]
#define DEFAULT_SYSCALL_ERROR_HANDLER \
.import __errno_location,code ASM_LINE_SEP \
/* branch to errno handler */ ASM_LINE_SEP \
bl __errno_location, %rp ASM_LINE_SEP
[snip]
#define DO_CALL(syscall_name, args) \
copy TREG, %r1 ASM_LINE_SEP \
copy %sp, TREG ASM_LINE_SEP \
/* Create a frame */ ASM_LINE_SEP \
stwm %r1, 64(%sp) ASM_LINE_SEP \
stw %rp, -20(%sp) ASM_LINE_SEP \
stw TREG, -4(%sp) ASM_LINE_SEP \
/* Save r19 */ ASM_LINE_SEP \
SAVE_PIC (TREG) ASM_LINE_SEP \
/* Do syscall, delay loads # */ ASM_LINE_SEP \
ble 0x100(%sr2, %r0) ASM_LINE_SEP \
ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \
ldi NO_ERROR, %r1 ASM_LINE_SEP \
cmpb,>>=,n %r1, %ret0,L(pre_end) ASM_LINE_SEP \
/* Restore r19 from TREG */ ASM_LINE_SEP \
LOAD_PIC(TREG) /* delay */ ASM_LINE_SEP \
SYSCALL_ERROR_HANDLER ASM_LINE_SEP \
/* Use TREG for temp storage */ ASM_LINE_SEP \
[snip]
Is it that method (I suppose mainly ".import __errno_location,code" ...), I
would have to follow to inline __syscall_error 'logic'?
Thanks a lot,
Joel
---------------------------------------------------------------
A free anti-spam and anti-virus filter on all Scarlet mailboxes
More info on http://www.scarlet.be/
More information about the parisc-linux
mailing list