py: Allow to enable inline assembler without native emitter.

This commit is contained in:
Damien George 2015-10-03 17:07:54 +01:00
parent f22be4ebd9
commit 0496de26d3
1 changed files with 3 additions and 3 deletions

View File

@ -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);