Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ppc64le Support #89

Merged
merged 2 commits into from
Aug 18, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions platform/switch_ppc64_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* this is the internal transfer function.
*
* HISTORY
* 10-Dec-13 Ulrich Weigand <[email protected]>
* Support ELFv2 ABI. Save float/vector registers.
* 09-Mar-12 Michael Ellerman <[email protected]>
* 64-bit implementation, copied from 32-bit.
* 07-Sep-05 (py-dev mailing list discussion)
Expand Down Expand Up @@ -40,14 +42,28 @@

#ifdef SLP_EVAL

#if _CALL_ELF == 2
#define STACK_MAGIC 4
#else
#define STACK_MAGIC 6
#endif

#if defined(__ALTIVEC__)
#define ALTIVEC_REGS \
"v20", "v21", "v22", "v23", "v24", "v25", "v26", "v27", \
"v28", "v29", "v30", "v31",
#else
#define ALTIVEC_REGS
#endif

/* !!!!WARNING!!!! need to add "r31" in the next line if this header file
* is meant to be compiled non-dynamically!
*/
#define REGS_TO_SAVE "r2", "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", \
ALTIVEC_REGS \
"cr2", "cr3", "cr4"

static int
slp_switch(void)
{
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def _find_platform_headers():

if sys.platform == 'win32' and os.environ.get('GREENLET_STATIC_RUNTIME') in ('1', 'yes'):
extra_compile_args = ['/MT']
elif os.uname()[4] in ['ppc64el', 'ppc64le']:
extra_compile_args = ['-fno-tree-dominator-opts']
else:
extra_compile_args = []

Expand Down