Commit de9cd00b authored by Damien George's avatar Damien George
Browse files

py/compile: Add an extra pass for Xtensa inline assembler.

It needs an extra pass to compute the size of the constant table for the
l32r instructions.
parent bbd0d27a
......@@ -3419,6 +3419,12 @@ mp_raw_code_t *mp_compile_to_raw_code(mp_parse_tree_t *parse_tree, qstr source_f
comp->emit = NULL;
comp->emit_inline_asm_method_table = &ASM_EMITTER(method_table);
compile_scope_inline_asm(comp, s, MP_PASS_CODE_SIZE);
// Xtensa requires an extra pass to compute size of l32r const table
// TODO this can be improved by calculating it during SCOPE pass
// but that requires some other structural changes to the asm emitters
compile_scope_inline_asm(comp, s, MP_PASS_CODE_SIZE);
if (comp->compile_error == MP_OBJ_NULL) {
compile_scope_inline_asm(comp, s, MP_PASS_EMIT);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment