Skip to content

Commit b471068

Browse files
stmcgovernlifflander
authored andcommitted
#2241: apply lib/context/src/context/asm hotfix changes
1 parent 6f00427 commit b471068

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

lib/context/src/context/asm/jump_ppc64_sysv_elf_gas.S

+4-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jump_fcontext:
9797
# endif
9898
#endif
9999
# reserve space on stack
100-
subi %r1, %r1, 184
100+
subi %r1, %r1, 192
101101

102102
#if _CALL_ELF != 2
103103
std %r2, 0(%r1) # save TOC
@@ -123,6 +123,7 @@ jump_fcontext:
123123
#if _CALL_ELF != 2
124124
std %r3, 152(%r1) # save hidden
125125
#endif
126+
stfd %f31, 184(%r1) # save F31
126127

127128
# save CR
128129
mfcr %r0
@@ -166,6 +167,7 @@ jump_fcontext:
166167
#if _CALL_ELF != 2
167168
ld %r3, 152(%r1) # restore hidden
168169
#endif
170+
lfd %f31, 184(%r1) # restore F31
169171

170172
# restore CR
171173
ld %r0, 160(%r1)
@@ -180,7 +182,7 @@ jump_fcontext:
180182
mtctr %r12
181183

182184
# adjust stack
183-
addi %r1, %r1, 184
185+
addi %r1, %r1, 192
184186

185187
#if _CALL_ELF == 2
186188
# copy transfer_t into transfer_fn arg registers

lib/context/src/context/asm/make_ppc64_sysv_elf_gas.S

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ make_fcontext:
105105

106106
# reserve space for context-data on context-stack
107107
# including 64 byte of linkage + parameter area (R1 % 16 == 0)
108-
subi %r3, %r3, 248
108+
subi %r3, %r3, 256
109109

110110
# third arg of make_fcontext() == address of context-function
111111
# entry point (ELFv2) or descriptor (ELFv1)
@@ -123,7 +123,7 @@ make_fcontext:
123123

124124
# set back-chain to zero
125125
li %r0, 0
126-
std %r0, 184(%r3)
126+
std %r0, 192(%r3)
127127

128128
#if _CALL_ELF != 2
129129
# zero in r3 indicates first jump to context-function

lib/context/src/context/asm/ontop_ppc64_sysv_elf_gas.S

+4-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ ontop_fcontext:
9797
# endif
9898
#endif
9999
# reserve space on stack
100-
subi %r1, %r1, 184
100+
subi %r1, %r1, 192
101101

102102
#if _CALL_ELF != 2
103103
std %r2, 0(%r1) # save TOC
@@ -123,6 +123,7 @@ ontop_fcontext:
123123
#if _CALL_ELF != 2
124124
std %r3, 152(%r1) # save hidden
125125
#endif
126+
stfd %f31, 184(%r1) # save F31
126127

127128
# save CR
128129
mfcr %r0
@@ -165,6 +166,7 @@ ontop_fcontext:
165166
#if _CALL_ELF != 2
166167
ld %r3, 152(%r1) # restore hidden
167168
#endif
169+
lfd %f31, 184(%r1) # restore F31
168170

169171
# restore CR
170172
ld %r0, 160(%r1)
@@ -203,7 +205,7 @@ return_to_ctx:
203205
mtlr %r0
204206

205207
# adjust stack
206-
addi %r1, %r1, 184
208+
addi %r1, %r1, 192
207209

208210
# jump to context
209211
bctr

0 commit comments

Comments
 (0)