diff options
author | Damien <damien.p.george@gmail.com> | 2013-10-06 01:01:01 +0100 |
---|---|---|
committer | Damien <damien.p.george@gmail.com> | 2013-10-06 01:01:01 +0100 |
commit | dc83382903675c017f449285bf42a51d0e936e4e (patch) | |
tree | 535bcc550ee75e3d3e919c2d73380d14833449f3 /py/emitinlinethumb.c | |
parent | 03d4124320fa2a6c987b86bbcd9afbd1563fdf40 (diff) | |
download | micropython-dc83382903675c017f449285bf42a51d0e936e4e.tar.gz micropython-dc83382903675c017f449285bf42a51d0e936e4e.zip |
Make runtime able to call inline asm with 1 argument.
Diffstat (limited to 'py/emitinlinethumb.c')
-rw-r--r-- | py/emitinlinethumb.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/py/emitinlinethumb.c b/py/emitinlinethumb.c index a17d39cc8a..ae226b74e7 100644 --- a/py/emitinlinethumb.c +++ b/py/emitinlinethumb.c @@ -57,7 +57,7 @@ static int emit_inline_thumb_count_params(emit_inline_asm_t *emit, int n_params, } for (int i = 0; i < n_params; i++) { if (!PY_PARSE_NODE_IS_ID(pn_params[i])) { - printf("SyntaxError: parameter to inline assembler must be an identifier %d\n", PY_PARSE_NODE_STRUCT_KIND((py_parse_node_struct_t*)pn_params[i])); + printf("SyntaxError: parameter to inline assembler must be an identifier\n"); return 0; } const char *p = qstr_str(PY_PARSE_NODE_LEAF_ARG(pn_params[i])); @@ -122,7 +122,10 @@ static int get_arg_label(emit_inline_asm_t *emit, qstr op, py_parse_node_t *pn_a return i; } } - printf("SyntaxError: label '%s' not defined\n", qstr_str(label_qstr)); + // only need to have the labels on the last pass + if (emit->pass == PASS_3) { + printf("SyntaxError: label '%s' not defined\n", qstr_str(label_qstr)); + } return 0; } |