mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-09 01:15:40 +00:00
tcg: Remove TCGV_EQUAL*
When we used structures for TCGv_*, we needed a macro in order to perform a comparison. Now that we use pointers, this is just clutter Backports commit 11f4e8f8bfaa2caaab24bef6bbbb8a0205015119 from qemu
This commit is contained in:
parent
d450156414
commit
4d9c8583fa
|
@ -903,7 +903,7 @@ static CCPrepare gen_prepare_eflags_c(DisasContext *s, TCGv reg)
|
|||
size = s->cc_op - CC_OP_SUBB;
|
||||
t1 = gen_ext_tl(tcg_ctx, cpu_tmp0, cpu_cc_src, size, false);
|
||||
/* If no temporary was used, be careful not to alias t1 and t0. */
|
||||
t0 = TCGV_EQUAL(t1, cpu_cc_src) ? cpu_tmp0 : reg;
|
||||
t0 = t1 == cpu_cc_src ? cpu_tmp0 : reg;
|
||||
tcg_gen_mov_tl(tcg_ctx, t0, cpu_cc_srcT);
|
||||
gen_extu(tcg_ctx, size, t0);
|
||||
goto add_sub;
|
||||
|
@ -1115,7 +1115,7 @@ static CCPrepare gen_prepare_cc(DisasContext *s, int b, TCGv reg)
|
|||
break;
|
||||
case JCC_L:
|
||||
gen_compute_eflags(s);
|
||||
if (TCGV_EQUAL(reg, cpu_cc_src)) {
|
||||
if (reg == cpu_cc_src) {
|
||||
reg = cpu_tmp0;
|
||||
}
|
||||
tcg_gen_shri_tl(tcg_ctx, reg, cpu_cc_src, 4); /* CC_O -> CC_S */
|
||||
|
@ -1125,7 +1125,7 @@ static CCPrepare gen_prepare_cc(DisasContext *s, int b, TCGv reg)
|
|||
default:
|
||||
case JCC_LE:
|
||||
gen_compute_eflags(s);
|
||||
if (TCGV_EQUAL(reg, cpu_cc_src)) {
|
||||
if (reg == cpu_cc_src) {
|
||||
reg = cpu_tmp0;
|
||||
}
|
||||
tcg_gen_shri_tl(tcg_ctx, reg, cpu_cc_src, 4); /* CC_O -> CC_S */
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#define MACREG(acc) tcg_ctx->cpu_macc[acc]
|
||||
#define QREG_SP tcg_ctx->cpu_aregs[7]
|
||||
|
||||
#define IS_NULL_QREG(t) (TCGV_EQUAL(t, tcg_ctx->NULL_QREG))
|
||||
#define IS_NULL_QREG(t) (t == tcg_ctx->NULL_QREG)
|
||||
|
||||
void m68k_tcg_init(struct uc_struct *uc)
|
||||
{
|
||||
|
|
|
@ -341,7 +341,7 @@ static inline void tcg_gen_discard_i32(TCGContext *s, TCGv_i32 arg)
|
|||
|
||||
static inline void tcg_gen_mov_i32(TCGContext *s, TCGv_i32 ret, TCGv_i32 arg)
|
||||
{
|
||||
if (!TCGV_EQUAL_I32(ret, arg)) {
|
||||
if (ret != arg) {
|
||||
tcg_gen_op2_i32(s, INDEX_op_mov_i32, ret, arg);
|
||||
}
|
||||
}
|
||||
|
@ -527,7 +527,7 @@ static inline void tcg_gen_discard_i64(TCGContext *s, TCGv_i64 arg)
|
|||
|
||||
static inline void tcg_gen_mov_i64(TCGContext *s, TCGv_i64 ret, TCGv_i64 arg)
|
||||
{
|
||||
if (!TCGV_EQUAL_I64(ret, arg)) {
|
||||
if (ret != arg) {
|
||||
tcg_gen_op2_i64(s, INDEX_op_mov_i64, ret, arg);
|
||||
}
|
||||
}
|
||||
|
@ -815,7 +815,6 @@ void tcg_gen_lookup_and_goto_ptr(TCGContext *s);
|
|||
#define tcg_temp_free tcg_temp_free_i32
|
||||
#define TCGV_UNUSED(x) TCGV_UNUSED_I32(x)
|
||||
#define TCGV_IS_UNUSED(x) TCGV_IS_UNUSED_I32(x)
|
||||
#define TCGV_EQUAL(a, b) TCGV_EQUAL_I32(a, b)
|
||||
#define tcg_gen_qemu_ld_tl tcg_gen_qemu_ld_i32
|
||||
#define tcg_gen_qemu_st_tl tcg_gen_qemu_st_i32
|
||||
#else
|
||||
|
@ -826,7 +825,6 @@ void tcg_gen_lookup_and_goto_ptr(TCGContext *s);
|
|||
#define tcg_temp_free tcg_temp_free_i64
|
||||
#define TCGV_UNUSED(x) TCGV_UNUSED_I64(x)
|
||||
#define TCGV_IS_UNUSED(x) TCGV_IS_UNUSED_I64(x)
|
||||
#define TCGV_EQUAL(a, b) TCGV_EQUAL_I64(a, b)
|
||||
#define tcg_gen_qemu_ld_tl tcg_gen_qemu_ld_i64
|
||||
#define tcg_gen_qemu_st_tl tcg_gen_qemu_st_i64
|
||||
#endif
|
||||
|
|
|
@ -431,10 +431,6 @@ typedef TCGv_ptr TCGv_env;
|
|||
#error Unhandled TARGET_LONG_BITS value
|
||||
#endif
|
||||
|
||||
#define TCGV_EQUAL_I32(a, b) ((a) == (b))
|
||||
#define TCGV_EQUAL_I64(a, b) ((a) == (b))
|
||||
#define TCGV_EQUAL_PTR(a, b) ((a) == (b))
|
||||
|
||||
/* Dummy definition to avoid compiler warnings. */
|
||||
#define TCGV_UNUSED_I32(x) (x = (TCGv_i32)-1)
|
||||
#define TCGV_UNUSED_I64(x) (x = (TCGv_i64)-1)
|
||||
|
|
Loading…
Reference in a new issue