python-greenlet/0003-Update-switch_ppc_aix.h.patch
zhang-liang-pengkun 2ce7646407 Update switch_ppc_aix.h
Signed-off-by: zhang-liang-pengkun <zhangliangpengkun@xfusion.com>
2023-12-21 17:57:34 +08:00

36 lines
1.2 KiB
Diff

From 8911c385326d539f299cd6f2c3e395cd5417f996 Mon Sep 17 00:00:00 2001
From: k2uhl <github@redlagoon.net>
Date: Tue, 21 May 2019 21:39:19 -0500
Subject: [PATCH] Update switch_ppc_aix.h
Based off abarnert's feedback on stackexchange, force use of a register instead of suggesting. From:
https://stackoverflow.com/questions/11587635/cross-compile-of-pythons-greenlet-and-gevent-on-linux-x86-64-for-powerpc
---
platform/switch_ppc_aix.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/platform/switch_ppc_aix.h b/platform/switch_ppc_aix.h
index 45a277a..c7d476f 100644
--- a/platform/switch_ppc_aix.h
+++ b/platform/switch_ppc_aix.h
@@ -56,14 +56,14 @@ slp_switch(void)
register int err;
register int *stackref, stsizediff;
__asm__ volatile ("" : : : REGS_TO_SAVE);
- __asm__ ("mr %0, 1" : "=g" (stackref) : );
+ __asm__ ("mr %0, 1" : "=r" (stackref) : );
{
SLP_SAVE_STATE(stackref, stsizediff);
__asm__ volatile (
"mr 11, %0\n"
"add 1, 1, 11\n"
: /* no outputs */
- : "g" (stsizediff)
+ : "r" (stsizediff)
: "11"
);
SLP_RESTORE_STATE();
--
2.39.0.windows.2