summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-10-03 17:07:54 +0100
committerDamien George <damien.p.george@gmail.com>2015-10-03 17:07:54 +0100
commit0496de26d35f6cb29094bb2bc79532d2b576fbbe (patch)
tree37ac6c5284107497c8ca460c373707e3ff8bd0da /py
parentf22be4ebd9cb301ec02257588e693647e6a01404 (diff)
downloadmicropython-0496de26d35f6cb29094bb2bc79532d2b576fbbe.tar.gz
micropython-0496de26d35f6cb29094bb2bc79532d2b576fbbe.zip
py: Allow to enable inline assembler without native emitter.
Diffstat (limited to 'py')
-rw-r--r--py/compile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/py/compile.c b/py/compile.c
index a3e8c49d1e..f9d53bc689 100644
--- a/py/compile.c
+++ b/py/compile.c
@@ -58,8 +58,6 @@ typedef enum {
#define EMIT_ARG(fun, ...) (comp->emit_method_table->fun(comp->emit, __VA_ARGS__))
#define EMIT_LOAD_FAST(qst, local_num) (comp->emit_method_table->load_id.fast(comp->emit, qst, local_num))
#define EMIT_LOAD_GLOBAL(qst) (comp->emit_method_table->load_id.global(comp->emit, qst))
-#define EMIT_INLINE_ASM(fun) (comp->emit_inline_asm_method_table->fun(comp->emit_inline_asm))
-#define EMIT_INLINE_ASM_ARG(fun, ...) (comp->emit_inline_asm_method_table->fun(comp->emit_inline_asm, __VA_ARGS__))
#else
@@ -71,6 +69,9 @@ typedef enum {
#endif
+#define EMIT_INLINE_ASM(fun) (comp->emit_inline_asm_method_table->fun(comp->emit_inline_asm))
+#define EMIT_INLINE_ASM_ARG(fun, ...) (comp->emit_inline_asm_method_table->fun(comp->emit_inline_asm, __VA_ARGS__))
+
// elements in this struct are ordered to make it compact
typedef struct _compiler_t {
qstr source_file;
@@ -3386,7 +3387,6 @@ mp_obj_t mp_compile(mp_parse_tree_t *parse_tree, qstr source_file, uint emit_opt
emit_inline_thumb = emit_inline_thumb_new(max_num_labels);
}
comp->emit = NULL;
- comp->emit_method_table = NULL;
comp->emit_inline_asm = emit_inline_thumb;
comp->emit_inline_asm_method_table = &emit_inline_thumb_method_table;
compile_scope_inline_asm(comp, s, MP_PASS_CODE_SIZE);