aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S8
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S56
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S16
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S8
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S218
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S10
6 files changed, 158 insertions, 158 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
index d3e9b49cfb..0c04df5119 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
@@ -121,15 +121,15 @@ ENTRY(__getcontext)
mflr r8
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r7
-#ifdef SHARED
+# ifdef SHARED
lwz r7,_rtld_global_ro@got(r7)
mtlr r8
- lwz r7,RTLD_GLOBAL_DL_HWCAP_OFFSET(r7)
-#else
+ lwz r7,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r7)
+# else
lwz r7,_dl_hwcap@got(r7)
mtlr r8
lwz r7,0(r7)
-#endif
+# endif
#else
lis r7,_dl_hwcap@ha
lwz r7,_dl_hwcap@l(r7)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
index cb2779731e..16d5a3b745 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
@@ -54,20 +54,20 @@ ENTRY(__setcontext)
bl JUMPTARGET(sigprocmask)
cmpwi r3,0
bne L(error_exit)
-
+
#ifdef PIC
mflr r8
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r7
-#ifdef SHARED
- lwz r7,_rtld_global@got(r7)
+# ifdef SHARED
+ lwz r7,_rtld_global_ro@got(r7)
mtlr r8
- lwz r7,RTLD_GLOBAL_DL_HWCAP_OFFSET(r7)
-#else
+ lwz r7,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r7)
+# else
lwz r7,_dl_hwcap@got(r7)
mtlr r8
lwz r7,0(r7)
-#endif
+# endif
#else
lis r7,_dl_hwcap@ha
lwz r7,_dl_hwcap@l(r7)
@@ -75,100 +75,100 @@ ENTRY(__setcontext)
andis. r7,r7,(PPC_FEATURE_HAS_ALTIVEC >> 16)
la r10,(_UC_VREGS)(r31)
beq L(has_no_vec)
-
+
lwz r0,(32*16)(r10)
li r9,(32*16)
cmpwi r0,0
mtspr VRSAVE,r0
- beq L(has_no_vec)
+ beq L(has_no_vec)
lvx v19,r9,r10
la r9,(16)(r10)
- lvx v0,0,r10
+ lvx v0,0,r10
lvx v1,0,r9
addi r10,r10,32
addi r9,r9,32
mtvscr v19
- lvx v2,0,r10
+ lvx v2,0,r10
lvx v3,0,r9
addi r10,r10,32
addi r9,r9,32
- lvx v4,0,r10
+ lvx v4,0,r10
lvx v5,0,r9
addi r10,r10,32
addi r9,r9,32
- lvx v6,0,r10
+ lvx v6,0,r10
lvx v7,0,r9
addi r10,r10,32
addi r9,r9,32
- lvx v8,0,r10
+ lvx v8,0,r10
lvx v9,0,r9
addi r10,r10,32
addi r9,r9,32
- lvx v10,0,r10
+ lvx v10,0,r10
lvx v11,0,r9
addi r10,r10,32
addi r9,r9,32
- lvx v12,0,r10
+ lvx v12,0,r10
lvx v13,0,r9
addi r10,r10,32
addi r9,r9,32
- lvx v14,0,r10
+ lvx v14,0,r10
lvx v15,0,r9
addi r10,r10,32
addi r9,r9,32
- lvx v16,0,r10
+ lvx v16,0,r10
lvx v17,0,r9
addi r10,r10,32
addi r9,r9,32
- lvx v18,0,r10
+ lvx v18,0,r10
lvx v11,0,r9
addi r19,r10,32
addi r9,r9,32
- lvx v20,0,r10
+ lvx v20,0,r10
lvx v21,0,r9
addi r10,r10,32
addi r9,r9,32
- lvx v22,0,r10
+ lvx v22,0,r10
lvx v23,0,r9
addi r10,r10,32
addi r9,r9,32
- lvx v24,0,r10
+ lvx v24,0,r10
lvx v25,0,r9
addi r10,r10,32
addi r9,r9,32
- lvx v26,0,r10
+ lvx v26,0,r10
lvx v27,0,r9
addi r10,r10,32
addi r9,r9,32
- lvx v28,0,r10
+ lvx v28,0,r10
lvx v29,0,r9
addi r10,r10,32
addi r9,r9,32
- lvx v30,0,r10
+ lvx v30,0,r10
lvx v31,0,r9
addi r10,r10,32
addi r9,r9,32
- lvx v10,0,r10
+ lvx v10,0,r10
lvx v11,0,r9
-
+
L(has_no_vec):
/* Restore the floating-point registers */
lfd fp31,_UC_FREGS+(32*8)(r31)
@@ -254,7 +254,7 @@ L(error_exit):
addi r1,r1,16
mtlr r0
blr
-
+
L(do_sigret):
addi r1,r3,-0xd0
li r0,SYS_ify(rt_sigreturn)
@@ -381,7 +381,7 @@ L(novec_error_exit):
addi r1,r1,16
mtlr r0
blr
-
+
L(novec_do_sigret):
addi r1,r3,-0xd0
li r0,SYS_ify(rt_sigreturn)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
index 4c92dd7583..607f282a9a 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
@@ -123,15 +123,15 @@ ENTRY(__swapcontext)
mflr r8
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r7
-#ifdef SHARED
+# ifdef SHARED
lwz r7,_rtld_global_ro@got(r7)
mtlr r8
- lwz r7,RTLD_GLOBAL_DL_HWCAP_OFFSET(r7)
-#else
+ lwz r7,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r7)
+# else
lwz r7,_dl_hwcap@got(r7)
mtlr r8
lwz r7,0(r7)
-#endif
+# endif
#else
lis r7,_dl_hwcap@ha
lwz r7,_dl_hwcap@l(r7)
@@ -265,15 +265,15 @@ L(no_vec):
mflr r8
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r7
-#ifdef SHARED
+# ifdef SHARED
lwz r7,_rtld_global_ro@got(r7)
mtlr r8
- lwz r7,RTLD_GLOBAL_DL_HWCAP_OFFSET(r7)
-#else
+ lwz r7,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r7)
+# else
lwz r7,_dl_hwcap@got(r7)
mtlr r8
lwz r7,0(r7)
-#endif
+# endif
#else
lis r7,_dl_hwcap@ha
lwz r7,_dl_hwcap@l(r7)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
index c950316b2f..13f2039766 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
@@ -268,12 +268,12 @@ ENTRY(__getcontext)
ld r5,.LC__dl_hwcap@toc(r2)
li r10,0
-#ifdef SHARED
+# ifdef SHARED
/* Load _rtld-global._dl_hwcap. */
- ld r5,RTLD_GLOBAL_DL_HWCAP_OFFSET(r5)
-#else
+ ld r5,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r5)
+# else
ld r5,0(r5) /* Load extern _dl_hwcap. */
-#endif
+# endif
andis. r5,r5,(PPC_FEATURE_HAS_ALTIVEC >> 16)
beq L(has_no_vec)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
index 490eb27578..1ff9448764 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
@@ -59,41 +59,41 @@ ENTRY(__novec_setcontext)
bne L(nv_error_exit)
lfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r31)
- lfd fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31)
+ lfd fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31)
lfd fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r31)
mtfsf 0xff,fp0
- lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31)
+ lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31)
lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31)
- lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31)
+ lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31)
lfd fp26,(SIGCONTEXT_FP_REGS+(PT_R26*8))(r31)
- lfd fp25,(SIGCONTEXT_FP_REGS+(PT_R25*8))(r31)
+ lfd fp25,(SIGCONTEXT_FP_REGS+(PT_R25*8))(r31)
lfd fp24,(SIGCONTEXT_FP_REGS+(PT_R24*8))(r31)
- lfd fp23,(SIGCONTEXT_FP_REGS+(PT_R23*8))(r31)
+ lfd fp23,(SIGCONTEXT_FP_REGS+(PT_R23*8))(r31)
lfd fp22,(SIGCONTEXT_FP_REGS+(PT_R22*8))(r31)
- lfd fp21,(SIGCONTEXT_FP_REGS+(PT_R21*8))(r31)
+ lfd fp21,(SIGCONTEXT_FP_REGS+(PT_R21*8))(r31)
lfd fp20,(SIGCONTEXT_FP_REGS+(PT_R20*8))(r31)
- lfd fp19,(SIGCONTEXT_FP_REGS+(PT_R19*8))(r31)
+ lfd fp19,(SIGCONTEXT_FP_REGS+(PT_R19*8))(r31)
lfd fp18,(SIGCONTEXT_FP_REGS+(PT_R18*8))(r31)
- lfd fp17,(SIGCONTEXT_FP_REGS+(PT_R17*8))(r31)
+ lfd fp17,(SIGCONTEXT_FP_REGS+(PT_R17*8))(r31)
lfd fp16,(SIGCONTEXT_FP_REGS+(PT_R16*8))(r31)
- lfd fp15,(SIGCONTEXT_FP_REGS+(PT_R15*8))(r31)
+ lfd fp15,(SIGCONTEXT_FP_REGS+(PT_R15*8))(r31)
lfd fp14,(SIGCONTEXT_FP_REGS+(PT_R14*8))(r31)
- lfd fp13,(SIGCONTEXT_FP_REGS+(PT_R13*8))(r31)
+ lfd fp13,(SIGCONTEXT_FP_REGS+(PT_R13*8))(r31)
lfd fp12,(SIGCONTEXT_FP_REGS+(PT_R12*8))(r31)
- lfd fp11,(SIGCONTEXT_FP_REGS+(PT_R11*8))(r31)
+ lfd fp11,(SIGCONTEXT_FP_REGS+(PT_R11*8))(r31)
lfd fp10,(SIGCONTEXT_FP_REGS+(PT_R10*8))(r31)
- lfd fp9,(SIGCONTEXT_FP_REGS+(PT_R9*8))(r31)
+ lfd fp9,(SIGCONTEXT_FP_REGS+(PT_R9*8))(r31)
lfd fp8,(SIGCONTEXT_FP_REGS+(PT_R8*8))(r31)
- lfd fp7,(SIGCONTEXT_FP_REGS+(PT_R7*8))(r31)
+ lfd fp7,(SIGCONTEXT_FP_REGS+(PT_R7*8))(r31)
lfd fp6,(SIGCONTEXT_FP_REGS+(PT_R6*8))(r31)
- lfd fp5,(SIGCONTEXT_FP_REGS+(PT_R5*8))(r31)
+ lfd fp5,(SIGCONTEXT_FP_REGS+(PT_R5*8))(r31)
lfd fp4,(SIGCONTEXT_FP_REGS+(PT_R4*8))(r31)
- lfd fp3,(SIGCONTEXT_FP_REGS+(PT_R3*8))(r31)
+ lfd fp3,(SIGCONTEXT_FP_REGS+(PT_R3*8))(r31)
lfd fp2,(SIGCONTEXT_FP_REGS+(PT_R2*8))(r31)
- lfd fp1,(SIGCONTEXT_FP_REGS+(PT_R1*8))(r31)
+ lfd fp1,(SIGCONTEXT_FP_REGS+(PT_R1*8))(r31)
lfd fp0,(SIGCONTEXT_FP_REGS+(PT_R0*8))(r31)
-
- ld r0,(SIGCONTEXT_GP_REGS+(PT_LNK*8))(r31)
+
+ ld r0,(SIGCONTEXT_GP_REGS+(PT_LNK*8))(r31)
ld r1,(SIGCONTEXT_GP_REGS+(PT_R1*8))(r31)
mtlr r0
ld r2,(SIGCONTEXT_GP_REGS+(PT_R2*8))(r31)
@@ -129,33 +129,33 @@ ENTRY(__novec_setcontext)
ld r28,(SIGCONTEXT_GP_REGS+(PT_R28*8))(r31)
ld r29,(SIGCONTEXT_GP_REGS+(PT_R29*8))(r31)
ld r30,(SIGCONTEXT_GP_REGS+(PT_R30*8))(r31)
-
+
/* Now we branch to the "Next Instruction Pointer" from the saved
- context. With the powerpc64 instruction set there is no good way to
+ context. With the powerpc64 instruction set there is no good way to
do this (from user state) without clobbering either the LR or CTR.
- The makecontext and swapcontext functions depend on the callers
+ The makecontext and swapcontext functions depend on the callers
LR being preserved so we use the CTR. */
ld r0,(SIGCONTEXT_GP_REGS+(PT_NIP*8))(r31)
mtctr r0
ld r0,(SIGCONTEXT_GP_REGS+(PT_R0*8))(r31)
ld r31,(SIGCONTEXT_GP_REGS+(PT_R31*8))(r31)
bctr
-
+
L(nv_error_exit):
- ld r0,128+FRAME_LR_SAVE(r1)
+ ld r0,128+FRAME_LR_SAVE(r1)
addi r1,r1,128
mtlr r0
ld r31,-8(r1)
blr
- /* At this point we assume that the ucontext was created by a
- rt_signal and we should use rt_sigreturn to restore the original
- state. As of the 2.4.21 kernel the ucontext is the first thing
- (offset 0) in the rt_signal frame and rt_sigreturn expects the
- ucontext address in R1. Normally the rt-signal trampoline handles
- this by popping dummy frame before the rt_signal syscall. In our
- case the stack may not be in its original (signal handler return with
- R1 pointing at the dummy frame) state. We do have the ucontext
+ /* At this point we assume that the ucontext was created by a
+ rt_signal and we should use rt_sigreturn to restore the original
+ state. As of the 2.4.21 kernel the ucontext is the first thing
+ (offset 0) in the rt_signal frame and rt_sigreturn expects the
+ ucontext address in R1. Normally the rt-signal trampoline handles
+ this by popping dummy frame before the rt_signal syscall. In our
+ case the stack may not be in its original (signal handler return with
+ R1 pointing at the dummy frame) state. We do have the ucontext
address in R3, so simply copy R3 to R1 before the syscall. */
L(nv_do_sigret):
mr r1,r3,
@@ -171,7 +171,7 @@ L(nv_do_sigret):
bl JUMPTARGET(__syscall_error)
nop
li r3,-1
- ld r0,128+FRAME_LR_SAVE(r1)
+ ld r0,128+FRAME_LR_SAVE(r1)
addi r1,r1,128
mtlr r0
blr
@@ -186,7 +186,7 @@ compat_symbol (libc, __novec_setcontext, setcontext, GLIBC_2_3)
.section ".toc","aw"
.LC__dl_hwcap:
#ifdef SHARED
- .tc _rtld_global[TC],_rtld_global
+ .tc _rtld_global_ro[TC],_rtld_global_ro
#else
.tc _dl_hwcap[TC],_dl_hwcap
#endif
@@ -221,153 +221,153 @@ ENTRY(__setcontext)
nop
cmpdi r3,0
bne L(error_exit)
-
+
ld r5,.LC__dl_hwcap@toc(r2)
ld r10,(SIGCONTEXT_V_REGS_PTR)(r31)
-#ifdef SHARED
+# ifdef SHARED
/* Load _rtld-global._dl_hwcap. */
- ld r5,RTLD_GLOBAL_DL_HWCAP_OFFSET(r5)
-#else
+ ld r5,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r5)
+# else
ld r5,0(r5) /* Load extern _dl_hwcap. */
-#endif
+# endif
andis. r5,r5,(PPC_FEATURE_HAS_ALTIVEC >> 16)
beq L(has_no_vec)
-
+
cmpdi r10,0
beq L(has_no_vec)
lwz r0,(33*16)(r10)
-
+
li r9,(16*32)
mtspr VRSAVE,r0
cmpwi r0,0
- beq L(has_no_vec)
-
+ beq L(has_no_vec)
+
lvx v19,r9,r10
la r9,(16)(r10)
-
- lvx v0,0,r10
+
+ lvx v0,0,r10
lvx v1,0,r9
addi r10,r10,32
addi r9,r9,32
-
+
mtvscr v19
- lvx v2,0,r10
+ lvx v2,0,r10
lvx v3,0,r9
addi r10,r10,32
addi r9,r9,32
-
- lvx v4,0,r10
+
+ lvx v4,0,r10
lvx v5,0,r9
addi r10,r10,32
addi r9,r9,32
-
- lvx v6,0,r10
+
+ lvx v6,0,r10
lvx v7,0,r9
addi r10,r10,32
addi r9,r9,32
-
- lvx v8,0,r10
+
+ lvx v8,0,r10
lvx v9,0,r9
addi r10,r10,32
addi r9,r9,32
-
- lvx v10,0,r10
+
+ lvx v10,0,r10
lvx v11,0,r9
addi r10,r10,32
addi r9,r9,32
-
- lvx v12,0,r10
+
+ lvx v12,0,r10
lvx v13,0,r9
addi r10,r10,32
addi r9,r9,32
-
- lvx v14,0,r10
+
+ lvx v14,0,r10
lvx v15,0,r9
addi r10,r10,32
addi r9,r9,32
-
- lvx v16,0,r10
+
+ lvx v16,0,r10
lvx v17,0,r9
addi r10,r10,32
addi r9,r9,32
-
- lvx v18,0,r10
+
+ lvx v18,0,r10
lvx v11,0,r9
addi r19,r10,32
addi r9,r9,32
-
- lvx v20,0,r10
+
+ lvx v20,0,r10
lvx v21,0,r9
addi r10,r10,32
addi r9,r9,32
-
- lvx v22,0,r10
+
+ lvx v22,0,r10
lvx v23,0,r9
addi r10,r10,32
addi r9,r9,32
-
- lvx v24,0,r10
+
+ lvx v24,0,r10
lvx v25,0,r9
addi r10,r10,32
addi r9,r9,32
-
- lvx v26,0,r10
+
+ lvx v26,0,r10
lvx v27,0,r9
addi r10,r10,32
addi r9,r9,32
-
- lvx v28,0,r10
+
+ lvx v28,0,r10
lvx v29,0,r9
addi r10,r10,32
addi r9,r9,32
-
- lvx v30,0,r10
+
+ lvx v30,0,r10
lvx v31,0,r9
addi r10,r10,32
addi r9,r9,32
-
- lvx v10,0,r10
+
+ lvx v10,0,r10
lvx v11,0,r9
addi r10,r10,32
addi r9,r9,32
-
+
L(has_no_vec):
lfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r31)
- lfd fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31)
+ lfd fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31)
lfd fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r31)
mtfsf 0xff,fp0
- lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31)
+ lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31)
lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31)
- lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31)
+ lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31)
lfd fp26,(SIGCONTEXT_FP_REGS+(PT_R26*8))(r31)
- lfd fp25,(SIGCONTEXT_FP_REGS+(PT_R25*8))(r31)
+ lfd fp25,(SIGCONTEXT_FP_REGS+(PT_R25*8))(r31)
lfd fp24,(SIGCONTEXT_FP_REGS+(PT_R24*8))(r31)
- lfd fp23,(SIGCONTEXT_FP_REGS+(PT_R23*8))(r31)
+ lfd fp23,(SIGCONTEXT_FP_REGS+(PT_R23*8))(r31)
lfd fp22,(SIGCONTEXT_FP_REGS+(PT_R22*8))(r31)
- lfd fp21,(SIGCONTEXT_FP_REGS+(PT_R21*8))(r31)
+ lfd fp21,(SIGCONTEXT_FP_REGS+(PT_R21*8))(r31)
lfd fp20,(SIGCONTEXT_FP_REGS+(PT_R20*8))(r31)
- lfd fp19,(SIGCONTEXT_FP_REGS+(PT_R19*8))(r31)
+ lfd fp19,(SIGCONTEXT_FP_REGS+(PT_R19*8))(r31)
lfd fp18,(SIGCONTEXT_FP_REGS+(PT_R18*8))(r31)
- lfd fp17,(SIGCONTEXT_FP_REGS+(PT_R17*8))(r31)
+ lfd fp17,(SIGCONTEXT_FP_REGS+(PT_R17*8))(r31)
lfd fp16,(SIGCONTEXT_FP_REGS+(PT_R16*8))(r31)
- lfd fp15,(SIGCONTEXT_FP_REGS+(PT_R15*8))(r31)
+ lfd fp15,(SIGCONTEXT_FP_REGS+(PT_R15*8))(r31)
lfd fp14,(SIGCONTEXT_FP_REGS+(PT_R14*8))(r31)
- lfd fp13,(SIGCONTEXT_FP_REGS+(PT_R13*8))(r31)
+ lfd fp13,(SIGCONTEXT_FP_REGS+(PT_R13*8))(r31)
lfd fp12,(SIGCONTEXT_FP_REGS+(PT_R12*8))(r31)
- lfd fp11,(SIGCONTEXT_FP_REGS+(PT_R11*8))(r31)
+ lfd fp11,(SIGCONTEXT_FP_REGS+(PT_R11*8))(r31)
lfd fp10,(SIGCONTEXT_FP_REGS+(PT_R10*8))(r31)
- lfd fp9,(SIGCONTEXT_FP_REGS+(PT_R9*8))(r31)
+ lfd fp9,(SIGCONTEXT_FP_REGS+(PT_R9*8))(r31)
lfd fp8,(SIGCONTEXT_FP_REGS+(PT_R8*8))(r31)
- lfd fp7,(SIGCONTEXT_FP_REGS+(PT_R7*8))(r31)
+ lfd fp7,(SIGCONTEXT_FP_REGS+(PT_R7*8))(r31)
lfd fp6,(SIGCONTEXT_FP_REGS+(PT_R6*8))(r31)
- lfd fp5,(SIGCONTEXT_FP_REGS+(PT_R5*8))(r31)
+ lfd fp5,(SIGCONTEXT_FP_REGS+(PT_R5*8))(r31)
lfd fp4,(SIGCONTEXT_FP_REGS+(PT_R4*8))(r31)
- lfd fp3,(SIGCONTEXT_FP_REGS+(PT_R3*8))(r31)
+ lfd fp3,(SIGCONTEXT_FP_REGS+(PT_R3*8))(r31)
lfd fp2,(SIGCONTEXT_FP_REGS+(PT_R2*8))(r31)
- lfd fp1,(SIGCONTEXT_FP_REGS+(PT_R1*8))(r31)
+ lfd fp1,(SIGCONTEXT_FP_REGS+(PT_R1*8))(r31)
lfd fp0,(SIGCONTEXT_FP_REGS+(PT_R0*8))(r31)
-
- ld r0,(SIGCONTEXT_GP_REGS+(PT_LNK*8))(r31)
+
+ ld r0,(SIGCONTEXT_GP_REGS+(PT_LNK*8))(r31)
ld r1,(SIGCONTEXT_GP_REGS+(PT_R1*8))(r31)
mtlr r0
ld r2,(SIGCONTEXT_GP_REGS+(PT_R2*8))(r31)
@@ -403,33 +403,33 @@ L(has_no_vec):
ld r28,(SIGCONTEXT_GP_REGS+(PT_R28*8))(r31)
ld r29,(SIGCONTEXT_GP_REGS+(PT_R29*8))(r31)
ld r30,(SIGCONTEXT_GP_REGS+(PT_R30*8))(r31)
-
+
/* Now we branch to the "Next Instruction Pointer" from the saved
- context. With the powerpc64 instruction set there is no good way to
+ context. With the powerpc64 instruction set there is no good way to
do this (from user state) without clobbering either the LR or CTR.
- The makecontext and swapcontext functions depend on the callers
+ The makecontext and swapcontext functions depend on the callers
LR being preserved so we use the CTR. */
ld r0,(SIGCONTEXT_GP_REGS+(PT_NIP*8))(r31)
mtctr r0
ld r0,(SIGCONTEXT_GP_REGS+(PT_R0*8))(r31)
ld r31,(SIGCONTEXT_GP_REGS+(PT_R31*8))(r31)
bctr
-
+
L(error_exit):
- ld r0,128+FRAME_LR_SAVE(r1)
+ ld r0,128+FRAME_LR_SAVE(r1)
addi r1,r1,128
mtlr r0
ld r31,-8(r1)
blr
- /* At this point we assume that the ucontext was created by a
- rt_signal and we should use rt_sigreturn to restore the original
- state. As of the 2.4.21 kernel the ucontext is the first thing
- (offset 0) in the rt_signal frame and rt_sigreturn expects the
- ucontext address in R1. Normally the rt-signal trampoline handles
- this by popping dummy frame before the rt_signal syscall. In our
- case the stack may not be in its original (signal handler return with
- R1 pointing at the dummy frame) state. We do have the ucontext
+ /* At this point we assume that the ucontext was created by a
+ rt_signal and we should use rt_sigreturn to restore the original
+ state. As of the 2.4.21 kernel the ucontext is the first thing
+ (offset 0) in the rt_signal frame and rt_sigreturn expects the
+ ucontext address in R1. Normally the rt-signal trampoline handles
+ this by popping dummy frame before the rt_signal syscall. In our
+ case the stack may not be in its original (signal handler return with
+ R1 pointing at the dummy frame) state. We do have the ucontext
address in R3, so simply copy R3 to R1 before the syscall. */
L(do_sigret):
mr r1,r3,
@@ -445,7 +445,7 @@ L(do_sigret):
bl JUMPTARGET(__syscall_error)
nop
li r3,-1
- ld r0,128+FRAME_LR_SAVE(r1)
+ ld r0,128+FRAME_LR_SAVE(r1)
addi r1,r1,128
mtlr r0
blr
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
index 8e2cc71b0a..64f29829e6 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
@@ -393,7 +393,7 @@ ENTRY(__swapcontext)
li r10,0
#ifdef SHARED
/* Load _rtld-global._dl_hwcap. */
- ld r8,RTLD_GLOBAL_DL_HWCAP_OFFSET(r8)
+ ld r8,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r8)
#else
ld r8,0(r8) /* Load extern _dl_hwcap. */
#endif
@@ -527,12 +527,12 @@ L(has_no_vec):
ld r8,.LC__dl_hwcap@toc(r2)
ld r10,(SIGCONTEXT_V_REGS_PTR)(r31)
-#ifdef SHARED
+# ifdef SHARED
/* Load _rtld-global._dl_hwcap. */
- ld r8,RTLD_GLOBAL_DL_HWCAP_OFFSET(r8)
-#else
+ ld r8,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r8)
+# else
ld r8,0(r8) /* Load extern _dl_hwcap. */
-#endif
+# endif
andis. r8,r8,(PPC_FEATURE_HAS_ALTIVEC >> 16)
beq L(has_no_vec2)