* 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>
This commit is contained in:
Ulrich Drepper 2005-12-30 21:04:04 +00:00
parent b36205c4ab
commit 5ad7714494
7 changed files with 41 additions and 16 deletions

View File

@ -1,3 +1,21 @@
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):

View File

@ -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)

View File

@ -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)

View File

@ -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. */

View File

@ -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

View File

@ -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 ())

View File

@ -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 ())