summaryrefslogtreecommitdiff
path: root/py/asmx64.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-04 13:55:24 +0000
committerDamien George <damien.p.george@gmail.com>2014-01-04 13:55:24 +0000
commite67ed5d285bb2ae7b83eb8be3ee488ab08fa4db1 (patch)
treeb11250057a7957da577daab994e91ef0a6718514 /py/asmx64.c
parent32f88410a153967af3f013d02a1a662aec19ec04 (diff)
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.
Diffstat (limited to 'py/asmx64.c')
-rw-r--r--py/asmx64.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/py/asmx64.c b/py/asmx64.c
index c425034ba..ed9ca80f5 100644
--- a/py/asmx64.c
+++ b/py/asmx64.c
@@ -6,6 +6,10 @@
#include "misc.h"
#include "asmx64.h"
+#include "mpconfig.h"
+
+// wrapper around everything in this file
+#if MICROPY_EMIT_X64
#if defined(__OpenBSD__) || defined(__MACH__)
#define MAP_ANONYMOUS MAP_ANON
@@ -620,3 +624,5 @@ void asm_x64_call_ind(asm_x64_t* as, void *ptr, int temp_r64) {
asm_x64_write_word32(as, ptr - (void*)(as->code_base + as->code_offset + 4));
*/
}
+
+#endif // MICROPY_EMIT_X64