Lines Matching full:ts

1807     TCGTemp *ts;  in tcg_context_init()  local
1854 ts = tcg_global_reg_new_internal(s, TCG_TYPE_PTR, TCG_AREG0, "env"); in tcg_context_init()
1855 tcg_env = temp_tcgv_ptr(ts); in tcg_context_init()
2008 TCGTemp *ts; in tcg_global_alloc() local
2013 ts = tcg_temp_alloc(s); in tcg_global_alloc()
2014 ts->kind = TEMP_GLOBAL; in tcg_global_alloc()
2016 return ts; in tcg_global_alloc()
2022 TCGTemp *ts; in tcg_global_reg_new_internal() local
2026 ts = tcg_global_alloc(s); in tcg_global_reg_new_internal()
2027 ts->base_type = type; in tcg_global_reg_new_internal()
2028 ts->type = type; in tcg_global_reg_new_internal()
2029 ts->kind = TEMP_FIXED; in tcg_global_reg_new_internal()
2030 ts->reg = reg; in tcg_global_reg_new_internal()
2031 ts->name = name; in tcg_global_reg_new_internal()
2034 return ts; in tcg_global_reg_new_internal()
2050 TCGTemp *ts = tcg_global_alloc(s); in tcg_global_mem_new_internal() local
2072 ts->base_type = TCG_TYPE_I64; in tcg_global_mem_new_internal()
2073 ts->type = TCG_TYPE_I32; in tcg_global_mem_new_internal()
2074 ts->indirect_reg = indirect_reg; in tcg_global_mem_new_internal()
2075 ts->mem_allocated = 1; in tcg_global_mem_new_internal()
2076 ts->mem_base = base_ts; in tcg_global_mem_new_internal()
2077 ts->mem_offset = offset; in tcg_global_mem_new_internal()
2080 ts->name = strdup(buf); in tcg_global_mem_new_internal()
2082 tcg_debug_assert(ts2 == ts + 1); in tcg_global_mem_new_internal()
2094 ts->base_type = type; in tcg_global_mem_new_internal()
2095 ts->type = type; in tcg_global_mem_new_internal()
2096 ts->indirect_reg = indirect_reg; in tcg_global_mem_new_internal()
2097 ts->mem_allocated = 1; in tcg_global_mem_new_internal()
2098 ts->mem_base = base_ts; in tcg_global_mem_new_internal()
2099 ts->mem_offset = offset; in tcg_global_mem_new_internal()
2100 ts->name = name; in tcg_global_mem_new_internal()
2102 return ts; in tcg_global_mem_new_internal()
2107 TCGTemp *ts = tcg_global_mem_new_internal(reg, off, name, TCG_TYPE_I32); in tcg_global_mem_new_i32() local
2108 return temp_tcgv_i32(ts); in tcg_global_mem_new_i32()
2113 TCGTemp *ts = tcg_global_mem_new_internal(reg, off, name, TCG_TYPE_I64); in tcg_global_mem_new_i64() local
2114 return temp_tcgv_i64(ts); in tcg_global_mem_new_i64()
2119 TCGTemp *ts = tcg_global_mem_new_internal(reg, off, name, TCG_TYPE_PTR); in tcg_global_mem_new_ptr() local
2120 return temp_tcgv_ptr(ts); in tcg_global_mem_new_ptr()
2126 TCGTemp *ts; in tcg_temp_new_internal() local
2136 ts = &s->temps[idx]; in tcg_temp_new_internal()
2137 ts->temp_allocated = 1; in tcg_temp_new_internal()
2138 tcg_debug_assert(ts->base_type == type); in tcg_temp_new_internal()
2139 tcg_debug_assert(ts->kind == kind); in tcg_temp_new_internal()
2140 return ts; in tcg_temp_new_internal()
2163 ts = tcg_temp_alloc(s); in tcg_temp_new_internal()
2164 ts->base_type = type; in tcg_temp_new_internal()
2165 ts->temp_allocated = 1; in tcg_temp_new_internal()
2166 ts->kind = kind; in tcg_temp_new_internal()
2169 ts->type = type; in tcg_temp_new_internal()
2171 ts->type = TCG_TYPE_REG; in tcg_temp_new_internal()
2176 tcg_debug_assert(ts2 == ts + i); in tcg_temp_new_internal()
2184 return ts; in tcg_temp_new_internal()
2262 void tcg_temp_free_internal(TCGTemp *ts) in tcg_temp_free_internal() argument
2266 switch (ts->kind) { in tcg_temp_free_internal()
2272 tcg_debug_assert(ts->temp_allocated != 0); in tcg_temp_free_internal()
2273 ts->temp_allocated = 0; in tcg_temp_free_internal()
2274 set_bit(temp_idx(ts), s->free_temps[ts->base_type].l); in tcg_temp_free_internal()
2311 TCGTemp *ts; in tcg_constant_internal() local
2318 ts = g_hash_table_lookup(h, &val); in tcg_constant_internal()
2319 if (ts == NULL) { in tcg_constant_internal()
2322 ts = tcg_temp_alloc(s); in tcg_constant_internal()
2327 tcg_debug_assert(ts2 == ts + 1); in tcg_constant_internal()
2329 ts->base_type = TCG_TYPE_I64; in tcg_constant_internal()
2330 ts->type = TCG_TYPE_I32; in tcg_constant_internal()
2331 ts->kind = TEMP_CONST; in tcg_constant_internal()
2332 ts->temp_allocated = 1; in tcg_constant_internal()
2345 ts[HOST_BIG_ENDIAN].val = val; in tcg_constant_internal()
2346 ts[!HOST_BIG_ENDIAN].val = val >> 32; in tcg_constant_internal()
2347 val_ptr = &ts[HOST_BIG_ENDIAN].val; in tcg_constant_internal()
2349 ts->base_type = type; in tcg_constant_internal()
2350 ts->type = type; in tcg_constant_internal()
2351 ts->kind = TEMP_CONST; in tcg_constant_internal()
2352 ts->temp_allocated = 1; in tcg_constant_internal()
2353 ts->val = val; in tcg_constant_internal()
2354 val_ptr = &ts->val; in tcg_constant_internal()
2356 g_hash_table_insert(h, val_ptr, ts); in tcg_constant_internal()
2359 return ts; in tcg_constant_internal()
2397 size_t temp_idx(TCGTemp *ts) in temp_idx() argument
2399 ptrdiff_t n = ts - tcg_ctx->temps; in temp_idx()
2666 TCGTemp *ts = args[loc->arg_idx] + loc->tmp_subindex; in tcg_gen_callN() local
2672 op->args[pi++] = temp_arg(ts); in tcg_gen_callN()
2679 TCGv_i32 orig = temp_tcgv_i32(ts); in tcg_gen_callN()
2770 TCGTemp *ts = &s->temps[i]; in tcg_reg_alloc_start() local
2773 switch (ts->kind) { in tcg_reg_alloc_start()
2786 ts->mem_allocated = 0; in tcg_reg_alloc_start()
2791 ts->val_type = val; in tcg_reg_alloc_start()
2798 TCGTemp *ts) in tcg_get_arg_str_ptr() argument
2800 int idx = temp_idx(ts); in tcg_get_arg_str_ptr()
2802 switch (ts->kind) { in tcg_get_arg_str_ptr()
2805 pstrcpy(buf, buf_size, ts->name); in tcg_get_arg_str_ptr()
2814 switch (ts->type) { in tcg_get_arg_str_ptr()
2816 snprintf(buf, buf_size, "$0x%x", (int32_t)ts->val); in tcg_get_arg_str_ptr()
2820 snprintf(buf, buf_size, "$0x%" PRIx64, ts->val); in tcg_get_arg_str_ptr()
2827 64 << (ts->type - TCG_TYPE_V64), ts->val); in tcg_get_arg_str_ptr()
3774 static inline TCGRegSet *la_temp_pref(TCGTemp *ts) in la_temp_pref() argument
3776 return ts->state_ptr; in la_temp_pref()
3782 static inline void la_reset_pref(TCGTemp *ts) in la_reset_pref() argument
3784 *la_temp_pref(ts) in la_reset_pref()
3785 = (ts->state == TS_DEAD ? 0 : tcg_target_available_regs[ts->type]); in la_reset_pref()
3811 TCGTemp *ts = &s->temps[i]; in la_bb_end() local
3814 switch (ts->kind) { in la_bb_end()
3827 ts->state = state; in la_bb_end()
3828 la_reset_pref(ts); in la_bb_end()
3857 TCGTemp *ts = &s->temps[i]; in la_bb_sync() local
3860 switch (ts->kind) { in la_bb_sync()
3862 state = ts->state; in la_bb_sync()
3863 ts->state = state | TS_MEM; in la_bb_sync()
3896 TCGTemp *ts = &s->temps[i]; in la_cross_call() local
3897 if (!(ts->state & TS_DEAD)) { in la_cross_call()
3898 TCGRegSet *pset = la_temp_pref(ts); in la_cross_call()
3904 set = tcg_target_available_regs[ts->type] & mask; in la_cross_call()
3955 TCGTemp *ts = arg_temp(op->args[i]); in liveness_pass_0() local
3957 if (ts->kind != TEMP_TB) { in liveness_pass_0()
3960 if (ts->state_ptr == NULL) { in liveness_pass_0()
3961 ts->state_ptr = ebb; in liveness_pass_0()
3962 } else if (ts->state_ptr != ebb) { in liveness_pass_0()
3963 ts->state_ptr = multiple_ebb; in liveness_pass_0()
3973 TCGTemp *ts = &s->temps[i]; in liveness_pass_0() local
3974 if (ts->kind == TEMP_TB && ts->state_ptr != multiple_ebb) { in liveness_pass_0()
3975 ts->kind = TEMP_EBB; in liveness_pass_0()
4015 TCGTemp *ts; in liveness_pass_1() local
4033 ts = arg_temp(op->args[i]); in liveness_pass_1()
4034 if (ts->state != TS_DEAD) { in liveness_pass_1()
4044 ts = arg_temp(op->args[i]); in liveness_pass_1()
4045 if (ts->state & TS_DEAD) { in liveness_pass_1()
4048 if (ts->state & TS_MEM) { in liveness_pass_1()
4051 ts->state = TS_DEAD; in liveness_pass_1()
4052 la_reset_pref(ts); in liveness_pass_1()
4067 ts = arg_temp(op->args[i]); in liveness_pass_1()
4068 if (ts->state & TS_DEAD) { in liveness_pass_1()
4088 ts = arg_temp(op->args[nb_oargs + i]); in liveness_pass_1()
4090 if (ts->state & TS_DEAD) { in liveness_pass_1()
4096 *la_temp_pref(ts) = 0; in liveness_pass_1()
4101 *la_temp_pref(ts) = in liveness_pass_1()
4102 tcg_target_available_regs[ts->type]; in liveness_pass_1()
4105 ts->state &= ~TS_DEAD; in liveness_pass_1()
4116 ts = arg_temp(op->args[nb_oargs + i]); in liveness_pass_1()
4123 tcg_regset_set_reg(*la_temp_pref(ts), in liveness_pass_1()
4138 ts = arg_temp(op->args[0]); in liveness_pass_1()
4139 ts->state = TS_DEAD; in liveness_pass_1()
4140 la_reset_pref(ts); in liveness_pass_1()
4194 ts = arg_temp(op->args[2]); in liveness_pass_1()
4195 if (ts->kind == TEMP_CONST) { in liveness_pass_1()
4196 ts = tcg_constant_internal(ts->type, -ts->val); in liveness_pass_1()
4197 if (ts->state_ptr == NULL) { in liveness_pass_1()
4198 tcg_debug_assert(temp_idx(ts) == nb_temps); in liveness_pass_1()
4200 ts->state_ptr = tcg_malloc(sizeof(TCGRegSet)); in liveness_pass_1()
4201 ts->state = TS_DEAD; in liveness_pass_1()
4202 la_reset_pref(ts); in liveness_pass_1()
4204 op->args[2] = temp_arg(ts); in liveness_pass_1()
4228 ts = arg_temp(op->args[0]); in liveness_pass_1()
4229 ts = tcg_constant_internal(ts->type, 1); in liveness_pass_1()
4230 op->args[2] = temp_arg(ts); in liveness_pass_1()
4245 ts = arg_temp(op->args[0]); in liveness_pass_1()
4246 ts = tcg_constant_internal(ts->type, -1); in liveness_pass_1()
4247 op->args[2] = temp_arg(ts); in liveness_pass_1()
4278 ts = arg_temp(op->args[i]); in liveness_pass_1()
4282 op->output_pref[i] = *la_temp_pref(ts); in liveness_pass_1()
4286 if (ts->state & TS_DEAD) { in liveness_pass_1()
4289 if (ts->state & TS_MEM) { in liveness_pass_1()
4292 ts->state = TS_DEAD; in liveness_pass_1()
4293 la_reset_pref(ts); in liveness_pass_1()
4316 ts = arg_temp(op->args[i]); in liveness_pass_1()
4317 if (ts->state & TS_DEAD) { in liveness_pass_1()
4327 ts = arg_temp(op->args[i]); in liveness_pass_1()
4328 if (ts->state & TS_DEAD) { in liveness_pass_1()
4331 *la_temp_pref(ts) = tcg_target_available_regs[ts->type]; in liveness_pass_1()
4332 ts->state &= ~TS_DEAD; in liveness_pass_1()
4357 ts = arg_temp(op->args[i]); in liveness_pass_1()
4358 pset = la_temp_pref(ts); in liveness_pass_1()
4563 static void temp_allocate_frame(TCGContext *s, TCGTemp *ts) in temp_allocate_frame() argument
4569 size = tcg_type_size(ts->base_type); in temp_allocate_frame()
4570 switch (ts->base_type) { in temp_allocate_frame()
4611 if (ts->base_type != ts->type) { in temp_allocate_frame()
4612 int part_size = tcg_type_size(ts->type); in temp_allocate_frame()
4619 ts -= ts->temp_subindex; in temp_allocate_frame()
4621 ts[i].mem_offset = off + i * part_size; in temp_allocate_frame()
4622 ts[i].mem_base = s->frame_temp; in temp_allocate_frame()
4623 ts[i].mem_allocated = 1; in temp_allocate_frame()
4626 ts->mem_offset = off; in temp_allocate_frame()
4627 ts->mem_base = s->frame_temp; in temp_allocate_frame()
4628 ts->mem_allocated = 1; in temp_allocate_frame()
4632 /* Assign @reg to @ts, and update reg_to_temp[]. */
4633 static void set_temp_val_reg(TCGContext *s, TCGTemp *ts, TCGReg reg) in set_temp_val_reg() argument
4635 if (ts->val_type == TEMP_VAL_REG) { in set_temp_val_reg()
4636 TCGReg old = ts->reg; in set_temp_val_reg()
4637 tcg_debug_assert(s->reg_to_temp[old] == ts); in set_temp_val_reg()
4644 s->reg_to_temp[reg] = ts; in set_temp_val_reg()
4645 ts->val_type = TEMP_VAL_REG; in set_temp_val_reg()
4646 ts->reg = reg; in set_temp_val_reg()
4649 /* Assign a non-register value type to @ts, and update reg_to_temp[]. */
4650 static void set_temp_val_nonreg(TCGContext *s, TCGTemp *ts, TCGTempVal type) in set_temp_val_nonreg() argument
4653 if (ts->val_type == TEMP_VAL_REG) { in set_temp_val_nonreg()
4654 TCGReg reg = ts->reg; in set_temp_val_nonreg()
4655 tcg_debug_assert(s->reg_to_temp[reg] == ts); in set_temp_val_nonreg()
4658 ts->val_type = type; in set_temp_val_nonreg()
4665 static void temp_free_or_dead(TCGContext *s, TCGTemp *ts, int free_or_dead) in temp_free_or_dead() argument
4669 switch (ts->kind) { in temp_free_or_dead()
4685 set_temp_val_nonreg(s, ts, new_type); in temp_free_or_dead()
4689 static inline void temp_dead(TCGContext *s, TCGTemp *ts) in temp_dead() argument
4691 temp_free_or_dead(s, ts, 1); in temp_dead()
4698 static void temp_sync(TCGContext *s, TCGTemp *ts, TCGRegSet allocated_regs, in temp_sync() argument
4701 if (!temp_readonly(ts) && !ts->mem_coherent) { in temp_sync()
4702 if (!ts->mem_allocated) { in temp_sync()
4703 temp_allocate_frame(s, ts); in temp_sync()
4705 switch (ts->val_type) { in temp_sync()
4711 && tcg_out_sti(s, ts->type, ts->val, in temp_sync()
4712 ts->mem_base->reg, ts->mem_offset)) { in temp_sync()
4715 temp_load(s, ts, tcg_target_available_regs[ts->type], in temp_sync()
4720 tcg_out_st(s, ts->type, ts->reg, in temp_sync()
4721 ts->mem_base->reg, ts->mem_offset); in temp_sync()
4731 ts->mem_coherent = 1; in temp_sync()
4734 temp_free_or_dead(s, ts, free_or_dead); in temp_sync()
4741 TCGTemp *ts = s->reg_to_temp[reg]; in tcg_reg_free() local
4742 if (ts != NULL) { in tcg_reg_free()
4743 temp_sync(s, ts, allocated_regs, 0, -1); in tcg_reg_free()
4867 static void temp_load(TCGContext *s, TCGTemp *ts, TCGRegSet desired_regs, in temp_load() argument
4872 switch (ts->val_type) { in temp_load()
4877 preferred_regs, ts->indirect_base); in temp_load()
4878 if (ts->type <= TCG_TYPE_I64) { in temp_load()
4879 tcg_out_movi(s, ts->type, reg, ts->val); in temp_load()
4881 uint64_t val = ts->val; in temp_load()
4897 tcg_out_dupi_vec(s, ts->type, vece, reg, ts->val); in temp_load()
4899 ts->mem_coherent = 0; in temp_load()
4902 if (!ts->mem_allocated) { in temp_load()
4903 temp_allocate_frame(s, ts); in temp_load()
4906 preferred_regs, ts->indirect_base); in temp_load()
4907 tcg_out_ld(s, ts->type, reg, ts->mem_base->reg, ts->mem_offset); in temp_load()
4908 ts->mem_coherent = 1; in temp_load()
4914 set_temp_val_reg(s, ts, reg); in temp_load()
4919 static void temp_save(TCGContext *s, TCGTemp *ts, TCGRegSet allocated_regs) in temp_save() argument
4923 tcg_debug_assert(ts->val_type == TEMP_VAL_MEM || temp_readonly(ts)); in temp_save()
4946 TCGTemp *ts = &s->temps[i]; in sync_globals() local
4947 tcg_debug_assert(ts->val_type != TEMP_VAL_REG in sync_globals()
4948 || ts->kind == TEMP_FIXED in sync_globals()
4949 || ts->mem_coherent); in sync_globals()
4959 TCGTemp *ts = &s->temps[i]; in tcg_reg_alloc_bb_end() local
4961 switch (ts->kind) { in tcg_reg_alloc_bb_end()
4963 temp_save(s, ts, allocated_regs); in tcg_reg_alloc_bb_end()
4968 tcg_debug_assert(ts->val_type == TEMP_VAL_DEAD); in tcg_reg_alloc_bb_end()
4972 tcg_debug_assert(ts->val_type == TEMP_VAL_CONST); in tcg_reg_alloc_bb_end()
4993 TCGTemp *ts = &s->temps[i]; in tcg_reg_alloc_cbranch() local
4998 switch (ts->kind) { in tcg_reg_alloc_cbranch()
5000 tcg_debug_assert(ts->val_type != TEMP_VAL_REG || ts->mem_coherent); in tcg_reg_alloc_cbranch()
5039 TCGTemp *ts, *ots; in tcg_reg_alloc_mov() local
5046 ts = arg_temp(op->args[1]); in tcg_reg_alloc_mov()
5053 itype = ts->type; in tcg_reg_alloc_mov()
5055 if (ts->val_type == TEMP_VAL_CONST) { in tcg_reg_alloc_mov()
5057 tcg_target_ulong val = ts->val; in tcg_reg_alloc_mov()
5059 temp_dead(s, ts); in tcg_reg_alloc_mov()
5069 if (ts->val_type == TEMP_VAL_MEM) { in tcg_reg_alloc_mov()
5070 temp_load(s, ts, tcg_target_available_regs[itype], in tcg_reg_alloc_mov()
5073 tcg_debug_assert(ts->val_type == TEMP_VAL_REG); in tcg_reg_alloc_mov()
5074 ireg = ts->reg; in tcg_reg_alloc_mov()
5085 temp_dead(s, ts); in tcg_reg_alloc_mov()
5091 if (IS_DEAD_ARG(1) && ts->kind != TEMP_FIXED) { in tcg_reg_alloc_mov()
5097 temp_dead(s, ts); in tcg_reg_alloc_mov()
5115 if (!ts->mem_allocated) { in tcg_reg_alloc_mov()
5118 tcg_out_st(s, ts->type, ireg, ots->mem_base->reg, ots->mem_offset); in tcg_reg_alloc_mov()
5119 set_temp_val_nonreg(s, ts, TEMP_VAL_MEM); in tcg_reg_alloc_mov()
5256 TCGTemp *ts; in tcg_reg_alloc_op() local
5311 ts = arg_temp(arg); in tcg_reg_alloc_op()
5313 if (ts->val_type == TEMP_VAL_CONST) { in tcg_reg_alloc_op()
5315 if (ts->val == 0 && (arg_ct->ct & TCG_CT_REG_ZERO)) { in tcg_reg_alloc_op()
5323 if (tcg_target_const_match(ts->val, arg_ct->ct, ts->type, in tcg_reg_alloc_op()
5327 new_args[i] = ts->val; in tcg_reg_alloc_op()
5332 reg = ts->reg; in tcg_reg_alloc_op()
5349 if (temp_readonly(ts) || !IS_DEAD_ARG(i) in tcg_reg_alloc_op()
5352 } else if (ts->val_type == TEMP_VAL_REG) { in tcg_reg_alloc_op()
5362 temp_load(s, ts, i_required_regs, i_allocated_regs, in tcg_reg_alloc_op()
5364 reg = ts->reg; in tcg_reg_alloc_op()
5372 temp_load(s, ts, tcg_target_available_regs[ts->type], in tcg_reg_alloc_op()
5375 i_preferred_regs, ts->indirect_base); in tcg_reg_alloc_op()
5394 !temp_readonly(ts) && in tcg_reg_alloc_op()
5395 ts->val_type == TEMP_VAL_REG && in tcg_reg_alloc_op()
5396 ts->reg < TCG_TARGET_NB_REGS - 1 && in tcg_reg_alloc_op()
5410 if (ts->val_type == TEMP_VAL_REG && in tcg_reg_alloc_op()
5418 0, ts->indirect_base); in tcg_reg_alloc_op()
5430 !temp_readonly(ts) && in tcg_reg_alloc_op()
5431 ts->val_type == TEMP_VAL_REG && in tcg_reg_alloc_op()
5442 ts->indirect_base); in tcg_reg_alloc_op()
5452 if (arg_ct->ialias && (!IS_DEAD_ARG(i) || temp_readonly(ts))) { in tcg_reg_alloc_op()
5462 if (ts->val_type == TEMP_VAL_REG && ts->reg == reg) { in tcg_reg_alloc_op()
5463 /* If ts was already in reg, copy it somewhere else. */ in tcg_reg_alloc_op()
5467 tcg_debug_assert(ts->kind != TEMP_FIXED); in tcg_reg_alloc_op()
5468 nr = tcg_reg_alloc(s, tcg_target_available_regs[ts->type], in tcg_reg_alloc_op()
5469 t_allocated_regs, 0, ts->indirect_base); in tcg_reg_alloc_op()
5470 ok = tcg_out_mov(s, ts->type, nr, reg); in tcg_reg_alloc_op()
5473 set_temp_val_reg(s, ts, nr); in tcg_reg_alloc_op()
5475 temp_load(s, ts, tcg_target_available_regs[ts->type], in tcg_reg_alloc_op()
5482 temp_load(s, ts, i_required_regs, i_allocated_regs, in tcg_reg_alloc_op()
5484 copyto_new_reg = ts->reg != reg; in tcg_reg_alloc_op()
5493 if (!tcg_out_mov(s, ts->type, reg, ts->reg)) { in tcg_reg_alloc_op()
5498 temp_sync(s, ts, i_allocated_regs, 0, 0); in tcg_reg_alloc_op()
5499 tcg_out_ld(s, ts->type, reg, in tcg_reg_alloc_op()
5500 ts->mem_base->reg, ts->mem_offset); in tcg_reg_alloc_op()
5540 ts = arg_temp(arg); in tcg_reg_alloc_op()
5543 tcg_debug_assert(!temp_readonly(ts)); in tcg_reg_alloc_op()
5552 output_pref(op, k), ts->indirect_base); in tcg_reg_alloc_op()
5555 output_pref(op, k), ts->indirect_base); in tcg_reg_alloc_op()
5566 ts->indirect_base); in tcg_reg_alloc_op()
5570 ts->indirect_base); in tcg_reg_alloc_op()
5591 set_temp_val_reg(s, ts, reg); in tcg_reg_alloc_op()
5592 ts->mem_coherent = 0; in tcg_reg_alloc_op()
5941 ts = arg_temp(op->args[i]); in tcg_reg_alloc_op()
5944 tcg_debug_assert(!temp_readonly(ts)); in tcg_reg_alloc_op()
5947 temp_sync(s, ts, o_allocated_regs, 0, IS_DEAD_ARG(i)); in tcg_reg_alloc_op()
5949 temp_dead(s, ts); in tcg_reg_alloc_op()
6041 static void load_arg_reg(TCGContext *s, TCGReg reg, TCGTemp *ts, in load_arg_reg() argument
6044 if (ts->val_type == TEMP_VAL_REG) { in load_arg_reg()
6045 if (ts->reg != reg) { in load_arg_reg()
6047 if (!tcg_out_mov(s, ts->type, reg, ts->reg)) { in load_arg_reg()
6052 temp_sync(s, ts, allocated_regs, 0, 0); in load_arg_reg()
6053 tcg_out_ld(s, ts->type, reg, in load_arg_reg()
6054 ts->mem_base->reg, ts->mem_offset); in load_arg_reg()
6062 temp_load(s, ts, arg_set, allocated_regs, 0); in load_arg_reg()
6066 static void load_arg_stk(TCGContext *s, unsigned arg_slot, TCGTemp *ts, in load_arg_stk() argument
6074 temp_load(s, ts, tcg_target_available_regs[ts->type], allocated_regs, 0); in load_arg_stk()
6075 tcg_out_st(s, ts->type, ts->reg, TCG_REG_CALL_STACK, in load_arg_stk()
6080 TCGTemp *ts, TCGRegSet *allocated_regs) in load_arg_normal() argument
6084 load_arg_reg(s, reg, ts, *allocated_regs); in load_arg_normal()
6087 load_arg_stk(s, l->arg_slot, ts, *allocated_regs); in load_arg_normal()
6125 TCGTemp *ts = arg_temp(op->args[nb_oargs + i]); in tcg_reg_alloc_call() local
6131 load_arg_normal(s, loc, ts, &allocated_regs); in tcg_reg_alloc_call()
6134 load_arg_stk(s, loc->ref_slot, ts, allocated_regs); in tcg_reg_alloc_call()
6140 load_arg_stk(s, loc->ref_slot, ts, allocated_regs); in tcg_reg_alloc_call()
6178 TCGTemp *ts = arg_temp(op->args[0]); in tcg_reg_alloc_call() local
6180 if (!ts->mem_allocated) { in tcg_reg_alloc_call()
6181 temp_allocate_frame(s, ts); in tcg_reg_alloc_call()
6183 load_arg_ref(s, 0, ts->mem_base->reg, ts->mem_offset, &allocated_regs); in tcg_reg_alloc_call()
6192 TCGTemp *ts = arg_temp(op->args[i]); in tcg_reg_alloc_call() local
6196 tcg_debug_assert(!temp_readonly(ts)); in tcg_reg_alloc_call()
6198 set_temp_val_reg(s, ts, reg); in tcg_reg_alloc_call()
6199 ts->mem_coherent = 0; in tcg_reg_alloc_call()
6205 TCGTemp *ts = arg_temp(op->args[0]); in tcg_reg_alloc_call() local
6207 tcg_debug_assert(ts->base_type == TCG_TYPE_I128); in tcg_reg_alloc_call()
6208 tcg_debug_assert(ts->temp_subindex == 0); in tcg_reg_alloc_call()
6209 if (!ts->mem_allocated) { in tcg_reg_alloc_call()
6210 temp_allocate_frame(s, ts); in tcg_reg_alloc_call()
6214 ts->mem_base->reg, ts->mem_offset); in tcg_reg_alloc_call()
6221 TCGTemp *ts = arg_temp(op->args[i]); in tcg_reg_alloc_call() local
6222 ts->val_type = TEMP_VAL_MEM; in tcg_reg_alloc_call()
6232 TCGTemp *ts = arg_temp(op->args[i]); in tcg_reg_alloc_call() local
6234 temp_sync(s, ts, s->reserved_regs, 0, IS_DEAD_ARG(i)); in tcg_reg_alloc_call()
6236 temp_dead(s, ts); in tcg_reg_alloc_call()