diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/ia64')
-rw-r--r-- | sysdeps/unix/sysv/linux/ia64/__longjmp.S | 5 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/ia64/setjmp.S | 20 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/ia64/sysdep.h | 23 |
3 files changed, 44 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/ia64/__longjmp.S b/sysdeps/unix/sysv/linux/ia64/__longjmp.S index 7922e81bea..aa18fadf9c 100644 --- a/sysdeps/unix/sysv/linux/ia64/__longjmp.S +++ b/sysdeps/unix/sysv/linux/ia64/__longjmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001, 2005 Free Software Foundation, Inc. Contributed by David Mosberger-Tang <davidm@hpl.hp.com>. The GNU C Library is free software; you can redistribute it and/or @@ -101,6 +101,9 @@ LEAF(__longjmp) ld8.nta r18=[r2],16 // b2 ld8.nta r19=[r3],16 // b3 ;; +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (r16, r24) +#endif ld8.nta r20=[r2],16 // b4 ld8.nta r21=[r3],16 // b5 ;; diff --git a/sysdeps/unix/sysv/linux/ia64/setjmp.S b/sysdeps/unix/sysv/linux/ia64/setjmp.S index 9c987c7ef8..53f80d203e 100644 --- a/sysdeps/unix/sysv/linux/ia64/setjmp.S +++ b/sysdeps/unix/sysv/linux/ia64/setjmp.S @@ -1,4 +1,5 @@ -/* Copyright (C) 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005 + Free Software Foundation, Inc. Contributed by David Mosberger-Tang <davidm@hpl.hp.com>. The GNU C Library is free software; you can redistribute it and/or @@ -86,7 +87,7 @@ libc_hidden_def (_setjmp) ENTRY(__sigsetjmp) .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2) - alloc loc1=ar.pfs,2,3,2,0 + alloc loc1=ar.pfs,2,5,2,0 .save ar.unat, loc2 mov loc2=ar.unat ;; @@ -140,7 +141,13 @@ ENTRY(__sigsetjmp) ;; stf.spill.nta [r8]=f28,32 stf.spill.nta [r9]=f29,32 +#ifdef PTR_MANGLE + mov loc3=loc0 ;; + PTR_MANGLE (loc3, loc4) +#else + ;; +#endif stf.spill.nta [r8]=f30 stf.spill.nta [r9]=f31 @@ -151,7 +158,11 @@ ENTRY(__sigsetjmp) mov r25=ar.unat mov out0=in0 +#ifdef PTR_MANGLE + st8.nta [r2]=loc3,16 // b0 +#else st8.nta [r2]=loc0,16 // b0 +#endif st8.nta [r3]=r17,16 // b1 mov out1=in1 ;; @@ -169,7 +180,12 @@ ENTRY(__sigsetjmp) ;; st8.nta [r2]=r25 // ar.unat st8.nta [r3]=in0 // &__jmp_buf +#if defined NOT_IN_libc && defined IS_IN_rtld + /* In ld.so we never save the signal mask. */ + ;; +#else br.call.dpnt.few rp=__sigjmp_save +#endif .ret0: // force a new bundle ::q mov.m ar.unat=loc2 // restore caller's unat mov rp=loc0 diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/sysdeps/unix/sysv/linux/ia64/sysdep.h index a4453ddcc7..ef7bc8e136 100644 --- a/sysdeps/unix/sysv/linux/ia64/sysdep.h +++ b/sysdeps/unix/sysv/linux/ia64/sysdep.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005 + Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999. Based on code originally written by David Mosberger-Tang @@ -360,4 +361,24 @@ #endif /* not __ASSEMBLER__ */ +/* Pointer mangling support. */ +#if defined NOT_IN_libc && defined IS_IN_rtld +/* We cannot use the thread descriptor because in ld.so we use setjmp + earlier than the descriptor is initialized. */ +#else +# ifdef __ASSEMBLER__ +# define PTR_MANGLE(reg, tmpreg) \ + add tmpreg=-16,r13 \ + ;; \ + ld8 tmpreg=[tmpreg] \ + ;; \ + xor reg=reg, tmpreg +# define PTR_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg) +# else +# define PTR_MANGLE(var) \ + (var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ()) +# define PTR_DEMANGLE(var) PTR_MANGLE (var) +# endif +#endif + #endif /* linux/ia64/sysdep.h */ |