aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George2014-09-03 22:40:15 +0100
committerDamien George2014-09-03 22:40:15 +0100
commita669cbc690a2540f6a4cfe453fa4b5bab074d940 (patch)
treec66c84d65bf8c84c783e1064f501b00cb303f10a
parent91fbea2c1ec2012b6a7857930ca64cba1f9f9a56 (diff)
unix: Auto-detect MICROPY_EMIT_X64 and MICROPY_GCREGS_SETJMP.
If not set, MICROPY_EMIT_X64 is set only if on x86-64 machine. If not set, MICROPY_GCREGS_SETJMP is set when on MIPS.
-rw-r--r--unix/mpconfigport.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h
index 7056f3a03..1a57eb251 100644
--- a/unix/mpconfigport.h
+++ b/unix/mpconfigport.h
@@ -27,8 +27,8 @@
// options to control how Micro Python is built
#define MICROPY_ALLOC_PATH_MAX (PATH_MAX)
-#ifndef MICROPY_EMIT_X64
-#define MICROPY_EMIT_X64 (1)
+#if !defined(MICROPY_EMIT_X64) && defined(__x86_64__)
+ #define MICROPY_EMIT_X64 (1)
#endif
#define MICROPY_EMIT_THUMB (0)
#define MICROPY_EMIT_INLINE_THUMB (0)
@@ -62,7 +62,11 @@
// Define to 1 to use untested inefficient GC helper implementation
// (if more efficient arch-specific one is not available).
#ifndef MICROPY_GCREGS_SETJMP
-#define MICROPY_GCREGS_SETJMP (0)
+ #ifdef __mips__
+ #define MICROPY_GCREGS_SETJMP (1)
+ #else
+ #define MICROPY_GCREGS_SETJMP (0)
+ #endif
#endif
#define MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF (1)