Lines Matching refs:TCGContext

67 static void tcg_target_init(TCGContext *s);
68 static void tcg_target_qemu_prologue(TCGContext *s);
74 static bool tcg_out_qemu_ld_slow_path(TCGContext *s, TCGLabelQemuLdst *l);
75 static bool tcg_out_qemu_st_slow_path(TCGContext *s, TCGLabelQemuLdst *l);
118 static void tcg_out_tb_start(TCGContext *s);
119 static void tcg_out_ld(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg1,
121 static bool tcg_out_mov(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg);
122 static void tcg_out_movi(TCGContext *s, TCGType type,
124 static void tcg_out_ext8s(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg);
125 static void tcg_out_ext16s(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg);
126 static void tcg_out_ext8u(TCGContext *s, TCGReg ret, TCGReg arg);
127 static void tcg_out_ext16u(TCGContext *s, TCGReg ret, TCGReg arg);
128 static void tcg_out_ext32s(TCGContext *s, TCGReg ret, TCGReg arg);
129 static void tcg_out_ext32u(TCGContext *s, TCGReg ret, TCGReg arg);
130 static void tcg_out_exts_i32_i64(TCGContext *s, TCGReg ret, TCGReg arg);
131 static void tcg_out_extu_i32_i64(TCGContext *s, TCGReg ret, TCGReg arg);
132 static void tcg_out_extrl_i64_i32(TCGContext *s, TCGReg ret, TCGReg arg);
133 static void tcg_out_addi_ptr(TCGContext *s, TCGReg, TCGReg, tcg_target_long);
134 static bool tcg_out_xchg(TCGContext *s, TCGType type, TCGReg r1, TCGReg r2);
135 static void tcg_out_exit_tb(TCGContext *s, uintptr_t arg);
136 static void tcg_out_goto_tb(TCGContext *s, int which);
137 static void tcg_out_goto_ptr(TCGContext *s, TCGReg dest);
138 static void tcg_out_mb(TCGContext *s, unsigned bar);
139 static void tcg_out_br(TCGContext *s, TCGLabel *l);
140 static void tcg_out_set_carry(TCGContext *s);
141 static void tcg_out_set_borrow(TCGContext *s);
143 static bool tcg_out_dup_vec(TCGContext *s, TCGType type, unsigned vece,
145 static bool tcg_out_dupm_vec(TCGContext *s, TCGType type, unsigned vece,
147 static void tcg_out_dupi_vec(TCGContext *s, TCGType type, unsigned vece,
149 static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc,
154 static inline bool tcg_out_dup_vec(TCGContext *s, TCGType type, unsigned vece, in tcg_out_dup_vec()
159 static inline bool tcg_out_dupm_vec(TCGContext *s, TCGType type, unsigned vece, in tcg_out_dupm_vec()
164 static inline void tcg_out_dupi_vec(TCGContext *s, TCGType type, unsigned vece, in tcg_out_dupi_vec()
169 static inline void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, in tcg_out_vec_op()
181 static void tcg_out_st(TCGContext *s, TCGType type, TCGReg arg, TCGReg arg1,
183 static bool tcg_out_sti(TCGContext *s, TCGType type, TCGArg val,
185 static void tcg_out_call(TCGContext *s, const tcg_insn_unit *target,
196 TCGReg (*ra_gen)(TCGContext *s, const TCGLabelQemuLdst *l, int arg_reg);
201 static void tcg_out_ld_helper_args(TCGContext *s, const TCGLabelQemuLdst *l,
204 static void tcg_out_ld_helper_ret(TCGContext *s, const TCGLabelQemuLdst *l,
207 static void tcg_out_st_helper_args(TCGContext *s, const TCGLabelQemuLdst *l,
239 static TCGAtomAlign atom_and_align_for_opc(TCGContext *s, MemOp opc,
247 TCGContext tcg_init_ctx;
248 __thread TCGContext *tcg_ctx;
250 TCGContext **tcg_ctxs;
265 static __attribute__((unused)) inline void tcg_out8(TCGContext *s, uint8_t v) in tcg_out8()
278 static __attribute__((unused)) inline void tcg_out16(TCGContext *s, uint16_t v) in tcg_out16()
301 static __attribute__((unused)) inline void tcg_out32(TCGContext *s, uint32_t v) in tcg_out32()
324 static __attribute__((unused)) inline void tcg_out64(TCGContext *s, uint64_t v) in tcg_out64()
348 static void tcg_out_reloc(TCGContext *s, tcg_insn_unit *code_ptr, int type, in tcg_out_reloc()
359 static void tcg_out_label(TCGContext *s, TCGLabel *l) in tcg_out_label()
368 TCGContext *s = tcg_ctx; in gen_new_label()
381 static bool tcg_resolve_relocs(TCGContext *s) in tcg_resolve_relocs()
398 static void set_jmp_reset_offset(TCGContext *s, int which) in set_jmp_reset_offset()
407 static void G_GNUC_UNUSED set_jmp_insn_offset(TCGContext *s, int which) in set_jmp_insn_offset()
416 static uintptr_t G_GNUC_UNUSED get_jmp_target_addr(TCGContext *s, int which) in get_jmp_target_addr()
426 tlb_mask_table_ofs(TCGContext *s, int which) in tlb_mask_table_ofs()
434 void tcg_raise_tb_overflow(TCGContext *s) in tcg_raise_tb_overflow()
467 static void tcg_out_movext(TCGContext *s, TCGType dst_type, TCGReg dst, in tcg_out_movext()
519 static void tcg_out_movext1_new_src(TCGContext *s, const TCGMovExtend *i, in tcg_out_movext1_new_src()
525 static void tcg_out_movext1(TCGContext *s, const TCGMovExtend *i) in tcg_out_movext1()
541 static void tcg_out_movext2(TCGContext *s, const TCGMovExtend *i1, in tcg_out_movext2()
582 static void tcg_out_movext3(TCGContext *s, const TCGMovExtend *i1, in tcg_out_movext3()
651 static TCGLabelQemuLdst *new_ldst_label(TCGContext *s) in new_ldst_label()
674 static TCGLabelPoolData *new_pool_alloc(TCGContext *s, int nlong, int rtype, in new_pool_alloc()
687 static void new_pool_insert(TCGContext *s, TCGLabelPoolData *n) in new_pool_insert()
710 static void new_pool_label(TCGContext *s, tcg_target_ulong d, int rtype, in new_pool_label()
720 static void new_pool_l2(TCGContext *s, int rtype, tcg_insn_unit *label, in new_pool_l2()
732 static void new_pool_l4(TCGContext *s, int rtype, tcg_insn_unit *label, in new_pool_l4()
747 static void new_pool_l8(TCGContext *s, int rtype, tcg_insn_unit *label, in new_pool_l8()
770 static int tcg_out_ldst_finalize(TCGContext *s) in tcg_out_ldst_finalize()
795 static int tcg_out_pool_finalize(TCGContext *s) in tcg_out_pool_finalize()
986 void (*out_rrr)(TCGContext *s, TCGType type,
988 void (*out_rri)(TCGContext *s, TCGType type,
990 void (*out_rir)(TCGContext *s, TCGType type,
992 void (*out_rii)(TCGContext *s, TCGType type,
998 void (*out_rrr)(TCGContext *s, TCGType type,
1000 void (*out_rri)(TCGContext *s, TCGType type,
1006 void (*out_rr)(TCGContext *s, TCGType type, TCGCond cond,
1008 void (*out_ri)(TCGContext *s, TCGType type, TCGCond cond,
1014 void (*out)(TCGContext *s, TCGCond cond, TCGReg al, TCGReg ah,
1021 void (*out_rr)(TCGContext *s, TCGType type,
1027 void (*out_rrr)(TCGContext *s, TCGType type, TCGReg a0, TCGReg a1,
1029 void (*out_rri)(TCGContext *s, TCGType type, TCGReg a0, TCGReg a1,
1031 void (*out_rzr)(TCGContext *s, TCGType type, TCGReg a0,
1037 void (*out_rr01r)(TCGContext *s, TCGType type,
1043 void (*out_rr)(TCGContext *s, TCGType type, TCGReg a0, TCGReg a1,
1049 void (*out_rrr)(TCGContext *s, TCGType type, TCGReg a0, TCGReg a1,
1055 void (*out)(TCGContext *s, TCGType type, TCGReg dest,
1061 void (*out)(TCGContext *s, TCGType type, TCGCond cond,
1068 void (*out_rrrr)(TCGContext *s, TCGType type,
1074 void (*out)(TCGContext *s, TCGType type, TCGReg dest,
1080 void (*out)(TCGContext *s, TCGType type, TCGReg dlo, TCGReg dhi,
1086 void (*out_rr)(TCGContext *s, TCGType type, TCGReg a0, TCGReg a1);
1091 void (*out_rrr)(TCGContext *s, TCGType type, TCGCond cond,
1093 void (*out_rri)(TCGContext *s, TCGType type, TCGCond cond,
1099 void (*out)(TCGContext *s, TCGCond cond, TCGReg ret, TCGReg al, TCGReg ah,
1105 void (*out_r)(TCGContext *s, TCGType type, TCGReg data,
1107 void (*out_i)(TCGContext *s, TCGType type, tcg_target_long data,
1113 void (*out_rrr)(TCGContext *s, TCGType type,
1115 void (*out_rir)(TCGContext *s, TCGType type,
1134 static void tgen_exts_i32_i64(TCGContext *s, TCGType t, TCGReg a0, TCGReg a1) in tgen_exts_i32_i64()
1144 static void tgen_extu_i32_i64(TCGContext *s, TCGType t, TCGReg a0, TCGReg a1) in tgen_extu_i32_i64()
1154 static void tgen_extrl_i64_i32(TCGContext *s, TCGType t, TCGReg a0, TCGReg a1) in tgen_extrl_i64_i32()
1290 TCGContext *s = g_malloc(sizeof(*s)); in tcg_register_thread()
1318 void *tcg_malloc_internal(TCGContext *s, int size) in tcg_malloc_internal()
1359 void tcg_pool_reset(TCGContext *s) in tcg_pool_reset()
1799 static TCGTemp *tcg_global_reg_new_internal(TCGContext *s, TCGType type,
1804 TCGContext *s = &tcg_init_ctx; in tcg_context_init()
1849 tcg_ctxs = g_new0(TCGContext *, max_threads); in tcg_context_init()
1867 TranslationBlock *tcg_tb_alloc(TCGContext *s) in tcg_tb_alloc()
1889 TCGContext *s = tcg_ctx; in tcg_prologue_init()
1964 void tcg_func_start(TCGContext *s) in tcg_func_start()
1995 static TCGTemp *tcg_temp_alloc(TCGContext *s) in tcg_temp_alloc()
2005 static TCGTemp *tcg_global_alloc(TCGContext *s) in tcg_global_alloc()
2018 static TCGTemp *tcg_global_reg_new_internal(TCGContext *s, TCGType type, in tcg_global_reg_new_internal()
2036 void tcg_set_frame(TCGContext *s, TCGReg reg, intptr_t start, intptr_t size) in tcg_set_frame()
2047 TCGContext *s = tcg_ctx; in tcg_global_mem_new_internal()
2124 TCGContext *s = tcg_ctx; in tcg_temp_new_internal()
2263 TCGContext *s = tcg_ctx; in tcg_temp_free_internal()
2308 TCGContext *s = tcg_ctx; in tcg_constant_internal()
2405 uintptr_t o = (uintptr_t)v - offsetof(TCGContext, temps); in tcgv_i32_temp()
2764 static void tcg_reg_alloc_start(TCGContext *s) in tcg_reg_alloc_start()
2796 static char *tcg_get_arg_str_ptr(TCGContext *s, char *buf, int buf_size, in tcg_get_arg_str_ptr()
2836 static char *tcg_get_arg_str(TCGContext *s, char *buf, in tcg_get_arg_str()
2933 void tcg_dump_ops(TCGContext *s, FILE *f, bool have_prefs) in tcg_dump_ops()
3553 void tcg_op_remove(TCGContext *s, TCGOp *op) in tcg_op_remove()
3576 TCGContext *s = tcg_ctx; in tcg_remove_ops_after()
3589 TCGContext *s = tcg_ctx; in tcg_op_alloc()
3630 TCGOp *tcg_op_insert_before(TCGContext *s, TCGOp *old_op, in tcg_op_insert_before()
3640 TCGOp *tcg_op_insert_after(TCGContext *s, TCGOp *old_op, in tcg_op_insert_after()
3676 reachable_code_pass(TCGContext *s) in reachable_code_pass()
3789 static void la_func_end(TCGContext *s, int ng, int nt) in la_func_end()
3805 static void la_bb_end(TCGContext *s, int ng, int nt) in la_bb_end()
3832 static void la_global_sync(TCGContext *s, int ng) in la_global_sync()
3851 static void la_bb_sync(TCGContext *s, int ng, int nt) in la_bb_sync()
3878 static void la_global_kill(TCGContext *s, int ng) in la_global_kill()
3889 static void la_cross_call(TCGContext *s, int nt) in la_cross_call()
3915 liveness_pass_0(TCGContext *s) in liveness_pass_0()
3979 static void assert_carry_dead(TCGContext *s) in assert_carry_dead()
3994 liveness_pass_1(TCGContext *s) in liveness_pass_1()
4381 liveness_pass_2(TCGContext *s) in liveness_pass_2()
4562 static void temp_allocate_frame(TCGContext *s, TCGTemp *ts) in temp_allocate_frame()
4632 static void set_temp_val_reg(TCGContext *s, TCGTemp *ts, TCGReg reg) in set_temp_val_reg()
4649 static void set_temp_val_nonreg(TCGContext *s, TCGTemp *ts, TCGTempVal type) in set_temp_val_nonreg()
4660 static void temp_load(TCGContext *, TCGTemp *, TCGRegSet, TCGRegSet, TCGRegSet);
4664 static void temp_free_or_dead(TCGContext *s, TCGTemp *ts, int free_or_dead) in temp_free_or_dead()
4688 static inline void temp_dead(TCGContext *s, TCGTemp *ts) in temp_dead()
4697 static void temp_sync(TCGContext *s, TCGTemp *ts, TCGRegSet allocated_regs, in temp_sync()
4738 static void tcg_reg_free(TCGContext *s, TCGReg reg, TCGRegSet allocated_regs) in tcg_reg_free()
4756 static TCGReg tcg_reg_alloc(TCGContext *s, TCGRegSet required_regs, in tcg_reg_alloc()
4818 static TCGReg tcg_reg_alloc_pair(TCGContext *s, TCGRegSet required_regs, in tcg_reg_alloc_pair()
4866 static void temp_load(TCGContext *s, TCGTemp *ts, TCGRegSet desired_regs, in temp_load()
4918 static void temp_save(TCGContext *s, TCGTemp *ts, TCGRegSet allocated_regs) in temp_save()
4928 static void save_globals(TCGContext *s, TCGRegSet allocated_regs) in save_globals()
4940 static void sync_globals(TCGContext *s, TCGRegSet allocated_regs) in sync_globals()
4954 static void tcg_reg_alloc_bb_end(TCGContext *s, TCGRegSet allocated_regs) in tcg_reg_alloc_bb_end()
4986 static void tcg_reg_alloc_cbranch(TCGContext *s, TCGRegSet allocated_regs) in tcg_reg_alloc_cbranch()
5013 static void tcg_reg_alloc_do_movi(TCGContext *s, TCGTemp *ots, in tcg_reg_alloc_do_movi()
5034 static void tcg_reg_alloc_mov(TCGContext *s, const TCGOp *op) in tcg_reg_alloc_mov()
5134 static void tcg_reg_alloc_dup(TCGContext *s, const TCGOp *op) in tcg_reg_alloc_dup()
5244 static void tcg_reg_alloc_op(TCGContext *s, const TCGOp *op) in tcg_reg_alloc_op()
5953 static bool tcg_reg_alloc_dup2(TCGContext *s, const TCGOp *op) in tcg_reg_alloc_dup2()
6040 static void load_arg_reg(TCGContext *s, TCGReg reg, TCGTemp *ts, in load_arg_reg()
6065 static void load_arg_stk(TCGContext *s, unsigned arg_slot, TCGTemp *ts, in load_arg_stk()
6078 static void load_arg_normal(TCGContext *s, const TCGCallArgumentLoc *l, in load_arg_normal()
6090 static void load_arg_ref(TCGContext *s, unsigned arg_slot, TCGReg ref_base, in load_arg_ref()
6109 static void tcg_reg_alloc_call(TCGContext *s, TCGOp *op) in tcg_reg_alloc_call()
6255 static TCGAtomAlign atom_and_align_for_opc(TCGContext *s, MemOp opc, in atom_and_align_for_opc()
6341 static void tcg_out_helper_load_slots(TCGContext *s, in tcg_out_helper_load_slots()
6427 static void tcg_out_helper_load_imm(TCGContext *s, unsigned slot, in tcg_out_helper_load_imm()
6443 static void tcg_out_helper_load_common_args(TCGContext *s, in tcg_out_helper_load_common_args()
6567 static void tcg_out_ld_helper_args(TCGContext *s, const TCGLabelQemuLdst *ldst, in tcg_out_ld_helper_args()
6648 static void tcg_out_ld_helper_ret(TCGContext *s, const TCGLabelQemuLdst *ldst, in tcg_out_ld_helper_ret()
6734 static void tcg_out_st_helper_args(TCGContext *s, const TCGLabelQemuLdst *ldst, in tcg_out_st_helper_args()
6841 int tcg_gen_code(TCGContext *s, TranslationBlock *tb, uint64_t pc_start) in tcg_gen_code()