py/compile: Support multiple inline asm emitters.

This commit is contained in:
Damien George
2019-03-09 12:32:09 +11:00
parent 9c9bc65e74
commit 55fcb83a42
4 changed files with 49 additions and 3 deletions

View File

@@ -255,6 +255,11 @@ void mp_emit_bc_end_except_handler(emit_t *emit);
typedef struct _emit_inline_asm_t emit_inline_asm_t;
typedef struct _emit_inline_asm_method_table_t {
#if MICROPY_DYNAMIC_COMPILER
emit_inline_asm_t *(*asm_new)(mp_uint_t max_num_labels);
void (*asm_free)(emit_inline_asm_t *emit);
#endif
void (*start_pass)(emit_inline_asm_t *emit, pass_kind_t pass, mp_obj_t *error_slot);
void (*end_pass)(emit_inline_asm_t *emit, mp_uint_t type_sig);
mp_uint_t (*count_params)(emit_inline_asm_t *emit, mp_uint_t n_params, mp_parse_node_t *pn_params);