summaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/powerpc32/setjmp-common.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/powerpc32/setjmp-common.S')
-rw-r--r--sysdeps/powerpc/powerpc32/setjmp-common.S23
1 files changed, 19 insertions, 4 deletions
diff --git a/sysdeps/powerpc/powerpc32/setjmp-common.S b/sysdeps/powerpc/powerpc32/setjmp-common.S
index 40f626498c..12ee14d788 100644
--- a/sysdeps/powerpc/powerpc32/setjmp-common.S
+++ b/sysdeps/powerpc/powerpc32/setjmp-common.S
@@ -1,5 +1,6 @@
/* setjmp for PowerPC.
- Copyright (C) 1995-1997,1999-2001,2003,2004 Free Software Foundation, Inc.
+ Copyright (C) 1995-1997,1999-2001,2003,2004,2005, 2006
+ 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
@@ -19,11 +20,10 @@
#include <sysdep.h>
#define _ASM
-#define _SETJMP_H
#ifdef __NO_VMX__
# include <novmxsetjmp.h>
#else
-# include <bits/setjmp.h>
+# include <jmpbuf-offsets.h>
#endif
#include <bp-sym.h>
#include <bp-asm.h>
@@ -32,9 +32,19 @@
ENTRY (BP_SYM (__sigsetjmp))
CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
+#ifdef PTR_MANGLE
+ mr r5,r1
+ PTR_MANGLE(r5, r10)
+ stw r5,(JB_GPR1*4)(3)
+#else
stw r1,(JB_GPR1*4)(3)
+#endif
mflr r0
stw r14,((JB_GPRS+0)*4)(3)
+#ifdef PTR_MANGLE
+ PTR_MANGLE2 (r0, r10)
+ li r10,0
+#endif
stw r0,(JB_LR*4)(3)
stw r15,((JB_GPRS+1)*4)(3)
mfcr r0
@@ -55,5 +65,10 @@ ENTRY (BP_SYM (__sigsetjmp))
stw r29,((JB_GPRS+15)*4)(3)
stw r30,((JB_GPRS+16)*4)(3)
stw r31,((JB_GPRS+17)*4)(3)
- b JUMPTARGET (BP_SYM (__sigjmp_save))
+#if defined NOT_IN_libc && defined IS_IN_rtld
+ li r3,0
+ blr
+#else
+ b BP_SYM (__sigjmp_save@local)
+#endif
END (BP_SYM (__sigsetjmp))