diff options
author | Damien George <damien.p.george@gmail.com> | 2016-12-09 20:54:54 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-12-09 20:54:54 +1100 |
commit | dd53b12193dca4800ab207170fcc883142dd0f22 (patch) | |
tree | 073f0a72e38288b95f0a6c74186b5f8a9d454c62 /py/compile.c | |
parent | a7fd786a1f8a0bd13ec97d9742f8705b90cd1c46 (diff) |
py/emitinline: Move inline-asm align and data methods to compiler.
These are generic methods that don't depend on the architecture and so
can be handled directly by the compiler.
Diffstat (limited to 'py/compile.c')
-rw-r--r-- | py/compile.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/py/compile.c b/py/compile.c index 6c9b6abfe..f98b783b5 100644 --- a/py/compile.c +++ b/py/compile.c @@ -34,6 +34,7 @@ #include "py/emit.h" #include "py/compile.h" #include "py/runtime.h" +#include "py/asmbase.h" #if MICROPY_ENABLE_COMPILER @@ -3224,7 +3225,8 @@ STATIC void compile_scope_inline_asm(compiler_t *comp, scope_t *scope, pass_kind return; } if (pass > MP_PASS_SCOPE) { - EMIT_INLINE_ASM_ARG(align, MP_PARSE_NODE_LEAF_SMALL_INT(pn_arg[0])); + mp_asm_base_align((mp_asm_base_t*)comp->emit_inline_asm, + MP_PARSE_NODE_LEAF_SMALL_INT(pn_arg[0])); } } else if (op == MP_QSTR_data) { if (!(n_args >= 2 && MP_PARSE_NODE_IS_SMALL_INT(pn_arg[0]))) { @@ -3238,7 +3240,8 @@ STATIC void compile_scope_inline_asm(compiler_t *comp, scope_t *scope, pass_kind compile_syntax_error(comp, nodes[i], "'data' requires integer arguments"); return; } - EMIT_INLINE_ASM_ARG(data, bytesize, MP_PARSE_NODE_LEAF_SMALL_INT(pn_arg[j])); + mp_asm_base_data((mp_asm_base_t*)comp->emit_inline_asm, + bytesize, MP_PARSE_NODE_LEAF_SMALL_INT(pn_arg[j])); } } } else { |