diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-12-18 06:07:27 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-12-18 06:07:27 +0000 |
commit | 3434f152228af9fa619de254559815363f86868a (patch) | |
tree | 1435e26d32157331baaedcbfea212e5c968224d5 | |
parent | 592f26a3ed6e74aad8ff65eec9c139a6bc4aa89e (diff) | |
download | glibc-3434f152228af9fa619de254559815363f86868a.tar glibc-3434f152228af9fa619de254559815363f86868a.tar.gz glibc-3434f152228af9fa619de254559815363f86868a.tar.bz2 glibc-3434f152228af9fa619de254559815363f86868a.zip |
Update.
2003-12-18 Carlos O'Donell <carlos@baldric.uwo.ca>
* sysdeps/unix/sysv/linux/hppa/clone.S (__clone) [PIC]: Save PIC,
reload PIC if we need to call __syscall_error, cleanup asm.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/hppa/clone.S | 23 |
2 files changed, 25 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2003-12-18 Carlos O'Donell <carlos@baldric.uwo.ca> + + * sysdeps/unix/sysv/linux/hppa/clone.S (__clone) [PIC]: Save PIC, + reload PIC if we need to call __syscall_error, cleanup asm. + 2003-12-17 Carlos O'Donell <carlos@baldric.uwo.ca> * sysdeps/hppa/fpu/fclrexcpt.c (feclearexcept): Right shift diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S index 459eaff195..4f3bb9e206 100644 --- a/sysdeps/unix/sysv/linux/hppa/clone.S +++ b/sysdeps/unix/sysv/linux/hppa/clone.S @@ -42,6 +42,11 @@ ENTRY(__clone) stwm %arg0,64(%arg1) stw %arg3,-60(%arg1) + /* Save the PIC register. */ +#ifdef PIC + stw %r19,-32(%sr0, %sp) /* parent */ +#endif + /* Do the system call */ copy %arg2,%arg0 ble 0x100(%sr2,%r0) @@ -53,19 +58,31 @@ ENTRY(__clone) comib,=,n 0,%ret0,thread_start - /* Successful return from the parent */ + /* Successful return from the parent + No need to restore the PIC register, + since we return immediately. */ + bv %r0(%rp) nop /* Something bad happened -- no child created */ .Lerror: + + /* Restore the PIC register on error */ +#ifdef PIC + ldw -32(%sr0, %sp), %r19 /* parent */ +#endif + b __syscall_error sub %r0,%ret0,%arg0 thread_start: + /* Load up the arguments. */ - ldw -60(%sp),%arg0 - ldw -64(%sp),%r22 + ldw -60(%sr0, %sp),%arg0 + ldw -64(%sr0, %sp),%r22 + + /* $$dyncall fixes childs PIC register */ /* Call the user's function */ bl $$dyncall,%r31 |