diff options
| author | Damien George | 2014-05-07 17:24:22 +0100 |
|---|---|---|
| committer | Damien George | 2014-05-07 17:24:22 +0100 |
| commit | 36db6bcf54fd32a247c85719832a9cf43e124ab5 (patch) | |
| tree | 9d23c6efc069a8410d894b2a27caf88b5f2bfba8 /py/emitinlinethumb.c | |
| parent | ca25c15d560f3f5337819bac65832cccc4752495 (diff) | |
py, compiler: Improve passes; add an extra pass for native emitter.
Diffstat (limited to 'py/emitinlinethumb.c')
| -rw-r--r-- | py/emitinlinethumb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/py/emitinlinethumb.c b/py/emitinlinethumb.c index ecdee3429..83ee7f69b 100644 --- a/py/emitinlinethumb.c +++ b/py/emitinlinethumb.c @@ -89,7 +89,7 @@ STATIC void emit_inline_thumb_start_pass(emit_inline_asm_t *emit, pass_kind_t pa emit->pass = pass; emit->success = true; emit->scope = scope; - asm_thumb_start_pass(emit->as, pass); + asm_thumb_start_pass(emit->as, pass == MP_PASS_EMIT ? ASM_THUMB_PASS_EMIT : ASM_THUMB_PASS_COMPUTE); asm_thumb_entry(emit->as, 0); } @@ -97,7 +97,7 @@ STATIC bool emit_inline_thumb_end_pass(emit_inline_asm_t *emit) { asm_thumb_exit(emit->as); asm_thumb_end_pass(emit->as); - if (emit->pass == PASS_3) { + if (emit->pass == MP_PASS_EMIT) { void *f = asm_thumb_get_code(emit->as); mp_emit_glue_assign_inline_asm_code(emit->scope->raw_code, f, asm_thumb_get_code_size(emit->as), emit->scope->num_pos_args); } @@ -230,7 +230,7 @@ STATIC int get_arg_label(emit_inline_asm_t *emit, const char *op, mp_parse_node_ } } // only need to have the labels on the last pass - if (emit->pass == PASS_3) { + if (emit->pass == MP_PASS_EMIT) { emit_inline_thumb_error(emit, "label '%s' not defined\n", qstr_str(label_qstr)); } return 0; |
