summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-05-08 02:24:43 +0300
committerDamien George <damien.p.george@gmail.com>2015-05-08 22:35:34 +0100
commitc3ae03ff18a9236c3b98efcfb581272bc56e292e (patch)
tree4ef18b3fd392bcee0ac05379bf483c184b78c2da
parent351424e71900d8d03d1a98a3fe8d2fa6561c0da8 (diff)
downloadmicropython-c3ae03ff18a9236c3b98efcfb581272bc56e292e.tar.gz
micropython-c3ae03ff18a9236c3b98efcfb581272bc56e292e.zip
unix: Fix thumb2 vs arm native emitter auto-detection.
Make thumb2 have priority over arm.
-rw-r--r--unix/mpconfigport.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h
index 31f3afed16..411817130a 100644
--- a/unix/mpconfigport.h
+++ b/unix/mpconfigport.h
@@ -35,8 +35,11 @@
#endif
#if !defined(MICROPY_EMIT_THUMB) && defined(__thumb2__)
#define MICROPY_EMIT_THUMB (1)
+ #define MICROPY_MAKE_POINTER_CALLABLE(p) ((void*)((mp_uint_t)(p) | 1))
#endif
-#if !defined(MICROPY_EMIT_ARM) && defined(__arm__)
+// Some compilers define __thumb2__ and __arm__ at the same time, let
+// autodetected thumb2 emitter have priority.
+#if !defined(MICROPY_EMIT_ARM) && defined(__arm__) && !defined(__thumb2__)
#define MICROPY_EMIT_ARM (1)
#endif
#define MICROPY_COMP_MODULE_CONST (1)