Skip to content

Commit c3ae03f

Browse files
pfalcondpgeorge
authored andcommitted
unix: Fix thumb2 vs arm native emitter auto-detection.
Make thumb2 have priority over arm.
1 parent 351424e commit c3ae03f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

unix/mpconfigport.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@
3535
#endif
3636
#if !defined(MICROPY_EMIT_THUMB) && defined(__thumb2__)
3737
#define MICROPY_EMIT_THUMB (1)
38+
#define MICROPY_MAKE_POINTER_CALLABLE(p) ((void*)((mp_uint_t)(p) | 1))
3839
#endif
39-
#if !defined(MICROPY_EMIT_ARM) && defined(__arm__)
40+
// Some compilers define __thumb2__ and __arm__ at the same time, let
41+
// autodetected thumb2 emitter have priority.
42+
#if !defined(MICROPY_EMIT_ARM) && defined(__arm__) && !defined(__thumb2__)
4043
#define MICROPY_EMIT_ARM (1)
4144
#endif
4245
#define MICROPY_COMP_MODULE_CONST (1)

0 commit comments

Comments
 (0)