summaryrefslogtreecommitdiffstatshomepage
path: root/py/emitinlinethumb.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/emitinlinethumb.c')
-rw-r--r--py/emitinlinethumb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/py/emitinlinethumb.c b/py/emitinlinethumb.c
index ecdee3429d..83ee7f69bf 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;