Update switch_ppc_aix.h

Signed-off-by: zhang-liang-pengkun <zhangliangpengkun@xfusion.com>
This commit is contained in:
zhang-liang-pengkun 2023-12-21 17:57:34 +08:00
parent 4ec3df5d6f
commit 2ce7646407
2 changed files with 40 additions and 1 deletions

View File

@ -0,0 +1,35 @@
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

View File

@ -1,12 +1,13 @@
Name: python-greenlet
Version: 0.4.14
Release: 6
Release: 7
Summary: lightweight coroutines for in-process concurrent programming
License: MIT
URL: https://github.com/python-greenlet/greenlet
Source0: https://github.com/python-greenlet/greenlet/archive/0.4.14.tar.gz
Patch0001: 0001-Add-support-for-RISC-V.patch
Patch0002: 0002-Workaround-a-gcc-bug-using-manual-save-restore-of-r3.patch
Patch0003: 0003-Update-switch_ppc_aix.h.patch
BuildRequires: python2-devel python2-setuptools python3-devel python3-setuptools
BuildRequires: gcc-c++
@ -85,6 +86,9 @@ that use python3-greenlet.
%{_includedir}/python%{python3_version}*/greenlet/
%changelog
* Thu Oct 23 2023 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 0.4.14-7
- Update switch_ppc_aix.h
* Thu Nov 02 2023 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 0.4.14-6
- Workaround a gcc bug using manual save/restore of r30