From e67ed5d285bb2ae7b83eb8be3ee488ab08fa4db1 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 4 Jan 2014 13:55:24 +0000 Subject: Improve configurability for native x64/thumb emitter. With MICROPY_EMIT_X64 and MICROPY_EMIT_THUMB disabled, the respective emitters and assemblers will not be included in the code. This can significantly reduce binary size for unix version. --- py/asmthumb.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'py/asmthumb.c') diff --git a/py/asmthumb.c b/py/asmthumb.c index ee8041ac9f..ba95d80c68 100644 --- a/py/asmthumb.c +++ b/py/asmthumb.c @@ -7,6 +7,9 @@ #include "mpconfig.h" #include "asmthumb.h" +// wrapper around everything in this file +#if MICROPY_EMIT_THUMB || MICROPY_EMIT_INLINE_THUMB + #define UNSIGNED_FIT8(x) (((x) & 0xffffff00) == 0) #define UNSIGNED_FIT16(x) (((x) & 0xffff0000) == 0) #define SIGNED_FIT8(x) (((x) & 0xffffff80) == 0) || (((x) & 0xffffff80) == 0xffffff80) @@ -447,3 +450,5 @@ void asm_thumb_bl_ind(asm_thumb_t *as, void *fun_ptr, uint fun_id, uint reg_temp asm_thumb_write_op16(as, OP_SVC(fun_id)); } } + +#endif // MICROPY_EMIT_THUMB || MICROPY_EMIT_INLINE_THUMB -- cgit v1.2.3