mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-30 10:51:39 +02:00
39 lines
1.4 KiB
Diff
39 lines
1.4 KiB
Diff
diff --git a/platform/switch_ppc64_linux.h b/platform/switch_ppc64_linux.h
|
|
index 88e6847..feb60d4 100644
|
|
--- a/platform/switch_ppc64_linux.h
|
|
+++ b/platform/switch_ppc64_linux.h
|
|
@@ -66,7 +66,6 @@
|
|
|
|
#define REGS_TO_SAVE "r14", "r15", "r16", "r17", "r18", "r19", "r20", \
|
|
"r21", "r22", "r23", "r24", "r25", "r26", "r27", "r28", "r29", \
|
|
- "r31", \
|
|
"fr14", "fr15", "fr16", "fr17", "fr18", "fr19", "fr20", "fr21", \
|
|
"fr22", "fr23", "fr24", "fr25", "fr26", "fr27", "fr28", "fr29", \
|
|
"fr30", "fr31", \
|
|
@@ -80,21 +79,25 @@ slp_switch(void)
|
|
register long *stackref, stsizediff;
|
|
void * toc;
|
|
void * r30;
|
|
+ void * r31;
|
|
__asm__ volatile ("" : : : REGS_TO_SAVE);
|
|
__asm__ volatile ("std 2, %0" : "=m" (toc));
|
|
__asm__ volatile ("std 30, %0" : "=m" (r30));
|
|
+ __asm__ volatile ("std 31, %0" : "=m" (r31));
|
|
__asm__ ("mr %0, 1" : "=r" (stackref) : );
|
|
{
|
|
SLP_SAVE_STATE(stackref, stsizediff);
|
|
__asm__ volatile (
|
|
"mr 11, %0\n"
|
|
"add 1, 1, 11\n"
|
|
+ "add 31, 31, 11\n"
|
|
: /* no outputs */
|
|
: "r" (stsizediff)
|
|
: "11"
|
|
);
|
|
SLP_RESTORE_STATE();
|
|
}
|
|
+ __asm__ volatile ("ld 31, %0" : : "m" (r31));
|
|
__asm__ volatile ("ld 30, %0" : : "m" (r30));
|
|
__asm__ volatile ("ld 2, %0" : : "m" (toc));
|
|
__asm__ volatile ("" : : : REGS_TO_SAVE);
|