diff options
author | Ulrich Drepper <drepper@redhat.com> | 2005-12-30 21:04:04 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2005-12-30 21:04:04 +0000 |
commit | 5ad77144942c0ea0a3f3c71d4ddccdf91e64771c (patch) | |
tree | f569e6b67256e78f1bb36da65e94bf1efffa5f8c | |
parent | b36205c4ab71222bf11fba59114f98fec8348777 (diff) | |
download | glibc-5ad77144942c0ea0a3f3c71d4ddccdf91e64771c.zip glibc-5ad77144942c0ea0a3f3c71d4ddccdf91e64771c.tar.gz glibc-5ad77144942c0ea0a3f3c71d4ddccdf91e64771c.tar.bz2 |
* sysdeps/powerpc/powerpc64/setjmp-common.S: Make sure pointer guard
value doesn't survive in a registers when the function returns.
* sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise.
* sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise.
2005-12-30 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Define
PTR_MANGLE2.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Define
PTR_MANGLE2 and PTR_DEMANGLE2.
* sysdeps/powerpc/powerpc64/__longjmp-common.S: Use PTR_DEMANGLE2.
* sysdeps/powerpc/powerpc64/setjmp-common.S: Use PTR_MANGLE2.
* sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise.
* sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise.
2005-12-30 Ulrich Drepper <drepper@redhat.com>
-rw-r--r-- | ChangeLog | 18 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc32/fpu/setjmp-common.S | 12 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc32/setjmp-common.S | 3 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/__longjmp-common.S | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/setjmp-common.S | 14 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h | 5 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h | 3 |
7 files changed, 41 insertions, 16 deletions
@@ -1,5 +1,23 @@ 2005-12-30 Ulrich Drepper <drepper@redhat.com> + * sysdeps/powerpc/powerpc64/setjmp-common.S: Make sure pointer guard + value doesn't survive in a registers when the function returns. + * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise. + * sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise. + +2005-12-30 Jakub Jelinek <jakub@redhat.com> + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Define + PTR_MANGLE2. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Define + PTR_MANGLE2 and PTR_DEMANGLE2. + * sysdeps/powerpc/powerpc64/__longjmp-common.S: Use PTR_DEMANGLE2. + * sysdeps/powerpc/powerpc64/setjmp-common.S: Use PTR_MANGLE2. + * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise. + * sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise. + +2005-12-30 Ulrich Drepper <drepper@redhat.com> + * sysdeps/unix/sysv/linux/ia64/bits/setjmp.h (_JMPBUF_UNWINDS): Don't use _demangle parameter for now. diff --git a/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S b/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S index dae7904..3afcf66 100644 --- a/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S +++ b/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S @@ -1,5 +1,5 @@ /* setjmp for PowerPC. - Copyright (C) 1995-99, 2000, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1995-2000, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -34,7 +34,7 @@ ENTRY (BP_SYM (__sigsetjmp)) #ifdef PTR_MANGLE mr r5,r1 - PTR_MANGLE(r5, r10) + PTR_MANGLE(r5, r6) stw r5,(JB_GPR1*4)(3) #else stw r1,(JB_GPR1*4)(3) @@ -43,7 +43,7 @@ ENTRY (BP_SYM (__sigsetjmp)) stw r14,((JB_GPRS+0)*4)(3) stfd fp14,((JB_FPRS+0*2)*4)(3) #ifdef PTR_MANGLE - PTR_MANGLE (r0, r10) + PTR_MANGLE2 (r0, r6) #endif stw r0,(JB_LR*4)(3) stw r15,((JB_GPRS+1)*4)(3) @@ -104,9 +104,9 @@ ENTRY (BP_SYM (__sigsetjmp)) lwz r5,0(r5) # endif # else - lis r5,_dl_hwcap@ha - lwz r5,_dl_hwcap@l(r5) -#endif + lis r6,_dl_hwcap@ha + lwz r5,_dl_hwcap@l(r6) +# endif andis. r5,r5,(PPC_FEATURE_HAS_ALTIVEC >> 16) beq L(no_vmx) la r5,((JB_VRS)*4)(3) diff --git a/sysdeps/powerpc/powerpc32/setjmp-common.S b/sysdeps/powerpc/powerpc32/setjmp-common.S index 3574092..69d36cc 100644 --- a/sysdeps/powerpc/powerpc32/setjmp-common.S +++ b/sysdeps/powerpc/powerpc32/setjmp-common.S @@ -43,7 +43,8 @@ ENTRY (BP_SYM (__sigsetjmp)) mflr r0 stw r14,((JB_GPRS+0)*4)(3) #ifdef PTR_MANGLE - PTR_MANGLE (r0, r10) + PTR_MANGLE2 (r0, r10) + li r10,0 #endif stw r0,(JB_LR*4)(3) stw r15,((JB_GPRS+1)*4)(3) diff --git a/sysdeps/powerpc/powerpc64/__longjmp-common.S b/sysdeps/powerpc/powerpc64/__longjmp-common.S index 82d1abd..bf7e324 100644 --- a/sysdeps/powerpc/powerpc64/__longjmp-common.S +++ b/sysdeps/powerpc/powerpc64/__longjmp-common.S @@ -132,7 +132,7 @@ L(no_vmx): ld r20,((JB_GPRS+6)*8)(r3) lfd fp20,((JB_FPRS+6)*8)(r3) #ifdef PTR_DEMANGLE - PTR_DEMANGLE (r0, r25) + PTR_DEMANGLE2 (r0, r25) #endif mtlr r0 /* std r2,40(r1) Restore the TOC save area. */ diff --git a/sysdeps/powerpc/powerpc64/setjmp-common.S b/sysdeps/powerpc/powerpc64/setjmp-common.S index 9660302..11ecedf 100644 --- a/sysdeps/powerpc/powerpc64/setjmp-common.S +++ b/sysdeps/powerpc/powerpc64/setjmp-common.S @@ -48,7 +48,7 @@ JUMPTARGET(GLUE(__sigsetjmp,_ent)): CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE) #ifdef PTR_MANGLE mr r5, r1 - PTR_MANGLE (r5, r10) + PTR_MANGLE (r5, r6) std r5,(JB_GPR1*8)(3) #else std r1,(JB_GPR1*8)(3) @@ -63,7 +63,7 @@ JUMPTARGET(GLUE(__sigsetjmp,_ent)): std r14,((JB_GPRS+0)*8)(3) stfd fp14,((JB_FPRS+0)*8)(3) #ifdef PTR_MANGLE - PTR_MANGLE (r0, r10) + PTR_MANGLE2 (r0, r6) #endif std r0,(JB_LR*8)(3) std r15,((JB_GPRS+1)*8)(3) @@ -103,14 +103,14 @@ JUMPTARGET(GLUE(__sigsetjmp,_ent)): std r31,((JB_GPRS+17)*8)(3) stfd fp31,((JB_FPRS+17)*8)(3) #ifndef __NO_VMX__ - ld r5,.LC__dl_hwcap@toc(r2) + ld r6,.LC__dl_hwcap@toc(r2) # ifdef SHARED /* Load _rtld-global._dl_hwcap. */ - ld r5,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r5) + ld r6,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r6) # else - ld r5,0(r5) /* Load extern _dl_hwcap. */ + ld r6,0(r6) /* Load extern _dl_hwcap. */ # endif - andis. r5,r5,(PPC_FEATURE_HAS_ALTIVEC >> 16) + andis. r6,r6,(PPC_FEATURE_HAS_ALTIVEC >> 16) beq L(no_vmx) la r5,((JB_VRS)*8)(3) andi. r6,r5,0xf @@ -185,6 +185,8 @@ L(aligned_save_vmx): stvx 30,0,r5 stvx 31,0,r6 L(no_vmx): +#else + li r6,0 #endif #if defined NOT_IN_libc && defined IS_IN_rtld li r3,0 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h index 0d23191..470da5a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h @@ -283,9 +283,10 @@ # define PTR_MANGLE(reg, tmpreg) \ lwz tmpreg,POINTER_GUARD(r2); \ xor reg,tmpreg,reg -# define PTR_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg) -# define PTR_DEMANGLE2(reg, tmpreg) \ +# define PTR_MANGLE2(reg, tmpreg) \ xor reg,tmpreg,reg +# define PTR_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg) +# define PTR_DEMANGLE2(reg, tmpreg) PTR_MANGLE2 (reg, tmpreg) # else # define PTR_MANGLE(var) \ (var) = (__typeof (var)) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ()) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h index e0b4cb3..858b5c4 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h @@ -297,7 +297,10 @@ # define PTR_MANGLE(reg, tmpreg) \ ld tmpreg,POINTER_GUARD(r13); \ xor reg,tmpreg,reg +# define PTR_MANGLE2(reg, tmpreg) \ + xor reg,tmpreg,reg # define PTR_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg) +# define PTR_DEMANGLE2(reg, tmpreg) PTR_MANGLE2 (reg, tmpreg) # else # define PTR_MANGLE(var) \ (var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ()) |