]> git.pld-linux.org Git - packages/glibc.git/blame - glibc-ppc-getcontext.patch
- changelog entry as comment to avoid rejects on earlier snaps
[packages/glibc.git] / glibc-ppc-getcontext.patch
CommitLineData
f9149591
JB
1diff -urN libc23-cvstip-20040812/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
2--- libc23-cvstip-20040812/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S 2004-06-15 15:02:20.000000000 -0500
3+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S 2004-08-30 18:22:17.372265184 -0500
4@@ -27,13 +27,12 @@
5
6 .machine "altivec"
7 ENTRY(__getcontext)
8+ stwu r1,-16(r1)
9 stw r3,_FRAME_PARM_SAVE1(r1)
10 addi r3,r3,_UC_REG_SPACE+12
11 clrrwi r3,r3,4
12 stw r0,_UC_GREGS+(PT_R0*4)(r3)
13 mflr r0
14- stw r1,_UC_GREGS+(PT_R1*4)(r3)
15- stwu r1,-16(r1)
16 stw r0,_UC_GREGS+(PT_LNK*4)(r3)
17 stw r0,_UC_GREGS+(PT_NIP*4)(r3)
18 stw r0,_FRAME_LR_SAVE+16(r1)
19@@ -73,6 +72,11 @@
20 mfcr r0
21 stw r0,_UC_GREGS+(PT_CCR*4)(r3)
22
23+ /* Save the value of R1. We had to push the stack before we
24+ had the address of uc_reg_space. So compute the address of
25+ the callers stack pointer and save it as R1. */
26+ addi r0,r1,16
27+ stw r0,_UC_GREGS+(PT_R1*4)(r3)
28 /* Set the return value of getcontext to "success". R3 is the only
29 register whose value is not preserved in the saved context. */
30 li r0,0
31@@ -229,7 +233,7 @@
32
33 L(no_vec):
34 /* Restore ucontext (parm1) from stack. */
35- lwz r12,_FRAME_PARM_SAVE1+16(r1)
36+ lwz r12,_FRAME_PARM_SAVE1(r1)
37 li r4,0
38 stw r3,_UC_REGS_PTR(r12)
39 addi r5,r12,_UC_SIGMASK
40diff -urN libc23-cvstip-20040812/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
41--- libc23-cvstip-20040812/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S 2004-06-15 15:02:20.000000000 -0500
42+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S 2004-08-30 18:22:36.391165968 -0500
43@@ -27,14 +27,13 @@
44
45 .machine "altivec"
46 ENTRY(__swapcontext)
47+ stwu r1,-16(r1)
48 /* Save the current context */
49 stw r3,_FRAME_PARM_SAVE1(r1)
50 addi r3,r3,_UC_REG_SPACE+12
51 clrrwi r3,r3,4
52 stw r0,_UC_GREGS+(PT_R0*4)(r3)
53- stw r1,_UC_GREGS+(PT_R1*4)(r3)
54 mflr r0
55- stwu r1,-16(r1)
56 stw r0,20(r1)
57 stw r31,12(r1)
58 stw r31,_UC_GREGS+(PT_R31*4)(r3)
59@@ -76,6 +75,12 @@
60 mfcr r0
61 stw r0,_UC_GREGS+(PT_CCR*4)(r3)
62
63+ /* Save the value of R1. We had to push the stack before we
64+ had the address of uc_reg_space. So compute the address of
65+ the callers stack pointer and save it as R1. */
66+ addi r0,r1,16
67+ stw r0,_UC_GREGS+(PT_R1*4)(r3)
68+
69 /* Set the return value of swapcontext to "success". R3 is the only
70 register whose value is not preserved in the saved context. */
71 li r0,0
72@@ -231,7 +236,7 @@
73
74 L(no_vec):
75 /* Restore ucontext (parm1) from stack. */
76- lwz r12,_FRAME_PARM_SAVE1+16(r1)
77+ lwz r12,_FRAME_PARM_SAVE1(r1)
78 li r4,0
79 stw r3,_UC_REGS_PTR(r12)
80 addi r5,r12,_UC_SIGMASK
This page took 0.055449 seconds and 4 git commands to generate.