Lines Matching refs:local_num
132 #define LOCAL_IDX_LOCAL_VAR(emit, local_num) ((emit)->stack_start + (emit)->n_state - 1 - (local_nu… argument
286 STATIC void emit_native_mov_state_reg(emit_t *emit, int local_num, int reg_src) { in emit_native_mov_state_reg() argument
288 ASM_STORE_REG_REG_OFFSET(emit->as, reg_src, REG_GENERATOR_STATE, local_num); in emit_native_mov_state_reg()
290 ASM_MOV_LOCAL_REG(emit->as, local_num, reg_src); in emit_native_mov_state_reg()
294 STATIC void emit_native_mov_reg_state(emit_t *emit, int reg_dest, int local_num) { in emit_native_mov_reg_state() argument
296 ASM_LOAD_REG_REG_OFFSET(emit->as, reg_dest, REG_GENERATOR_STATE, local_num); in emit_native_mov_reg_state()
298 ASM_MOV_REG_LOCAL(emit->as, reg_dest, local_num); in emit_native_mov_reg_state()
302 STATIC void emit_native_mov_reg_state_addr(emit_t *emit, int reg_dest, int local_num) { in emit_native_mov_reg_state_addr() argument
304 ASM_MOV_REG_IMM(emit->as, reg_dest, local_num * ASM_WORD_SIZE); in emit_native_mov_reg_state_addr()
307 ASM_MOV_REG_LOCAL_ADDR(emit->as, reg_dest, local_num); in emit_native_mov_reg_state_addr()
337 #define emit_native_mov_state_imm_via(emit, local_num, imm, reg_temp) \ argument
340 emit_native_mov_state_reg((emit), (local_num), (reg_temp)); \
343 #define emit_native_mov_state_imm_fix_u16_via(emit, local_num, imm, reg_temp) \ argument
346 emit_native_mov_state_reg((emit), (local_num), (reg_temp)); \
349 #define emit_native_mov_state_imm_fix_word_via(emit, local_num, imm, reg_temp) \ argument
352 emit_native_mov_state_reg((emit), (local_num), (reg_temp)); \
396 assert(id->local_num < emit->local_vtype_alloc); in emit_native_start_pass()
397 emit->local_vtype[id->local_num] = id->flags >> ID_FLAG_VIPER_TYPE_POS; in emit_native_start_pass()
628 emit->local_vtype[id->local_num] = VTYPE_PYOBJ; in emit_native_start_pass()
639 if ((id->flags & ID_FLAG_IS_PARAM) && id->local_num == i) { in emit_native_start_pass()
686 assert(id->local_num <= 255); in emit_native_end_pass()
687 …mp_asm_base_data(&emit->as->base, 1, id->local_num); // write the local which should be converted … in emit_native_end_pass()
1064 mp_uint_t local_num = emit->stack_start + emit->stack_size - 1 - i; in emit_get_stack_pointer_to_reg_for_pop() local
1065 emit_native_mov_reg_state(emit, REG_ARG_1, local_num); in emit_get_stack_pointer_to_reg_for_pop()
1067 emit_native_mov_state_reg(emit, local_num, REG_RET); in emit_get_stack_pointer_to_reg_for_pop()
1069 DEBUG_printf(" convert_native_to_obj(local_num=" UINT_FMT ")\n", local_num); in emit_get_stack_pointer_to_reg_for_pop()
1439 STATIC void emit_native_load_fast(emit_t *emit, qstr qst, mp_uint_t local_num) { in emit_native_load_fast() argument
1440 DEBUG_printf("load_fast(%s, " UINT_FMT ")\n", qstr_str(qst), local_num); in emit_native_load_fast()
1441 vtype_kind_t vtype = emit->local_vtype[local_num]; in emit_native_load_fast()
1446 if (local_num < REG_LOCAL_NUM && CAN_USE_REGS_FOR_LOCALS(emit)) { in emit_native_load_fast()
1447 emit_post_push_reg(emit, vtype, reg_local_table[local_num]); in emit_native_load_fast()
1450 emit_native_mov_reg_state(emit, REG_TEMP0, LOCAL_IDX_LOCAL_VAR(emit, local_num)); in emit_native_load_fast()
1455 STATIC void emit_native_load_deref(emit_t *emit, qstr qst, mp_uint_t local_num) { in emit_native_load_deref() argument
1456 DEBUG_printf("load_deref(%s, " UINT_FMT ")\n", qstr_str(qst), local_num); in emit_native_load_deref()
1458 emit_native_load_fast(emit, qst, local_num); in emit_native_load_deref()
1467 STATIC void emit_native_load_local(emit_t *emit, qstr qst, mp_uint_t local_num, int kind) { in emit_native_load_local() argument
1469 emit_native_load_fast(emit, qst, local_num); in emit_native_load_local()
1471 emit_native_load_deref(emit, qst, local_num); in emit_native_load_local()
1663 STATIC void emit_native_store_fast(emit_t *emit, qstr qst, mp_uint_t local_num) { in emit_native_store_fast() argument
1665 if (local_num < REG_LOCAL_NUM && CAN_USE_REGS_FOR_LOCALS(emit)) { in emit_native_store_fast()
1666 emit_pre_pop_reg(emit, &vtype, reg_local_table[local_num]); in emit_native_store_fast()
1669 emit_native_mov_state_reg(emit, LOCAL_IDX_LOCAL_VAR(emit, local_num), REG_TEMP0); in emit_native_store_fast()
1674 if (emit->local_vtype[local_num] == VTYPE_UNBOUND) { in emit_native_store_fast()
1676 emit->local_vtype[local_num] = vtype; in emit_native_store_fast()
1677 } else if (emit->local_vtype[local_num] != vtype) { in emit_native_store_fast()
1681 qst, vtype_to_qstr(emit->local_vtype[local_num]), vtype_to_qstr(vtype)); in emit_native_store_fast()
1685 STATIC void emit_native_store_deref(emit_t *emit, qstr qst, mp_uint_t local_num) { in emit_native_store_deref() argument
1686 DEBUG_printf("store_deref(%s, " UINT_FMT ")\n", qstr_str(qst), local_num); in emit_native_store_deref()
1689 emit_native_load_fast(emit, qst, local_num); in emit_native_store_deref()
1699 STATIC void emit_native_store_local(emit_t *emit, qstr qst, mp_uint_t local_num, int kind) { in emit_native_store_local() argument
1701 emit_native_store_fast(emit, qst, local_num); in emit_native_store_local()
1703 emit_native_store_deref(emit, qst, local_num); in emit_native_store_local()
1915 STATIC void emit_native_delete_local(emit_t *emit, qstr qst, mp_uint_t local_num, int kind) { in emit_native_delete_local() argument
1921 emit_native_store_fast(emit, qst, local_num); in emit_native_delete_local()