mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
target/arm: Use tcg_constant in trans_CSEL
Signed-off-by: Richard Henderson <[email protected]> Reviewed-by: Peter Maydell <[email protected]> Message-id: [email protected] Signed-off-by: Peter Maydell <[email protected]>
This commit is contained in:
1 parent
5b95562c50
commit
0b188ea05a
1 file changed
+3
-4
@@ -8982,13 +8982,14 @@ static bool trans_CSEL(DisasContext *s, arg_CSEL *a)
|
||||
}
|
||||
|
||||
/* In this insn input reg fields of 0b1111 mean "zero", not "PC" */
|
||||
zero = tcg_constant_i32(0);
|
||||
if (a->rn == 15) {
|
||||
rn = tcg_const_i32(0);
|
||||
rn = zero;
|
||||
} else {
|
||||
rn = load_reg(s, a->rn);
|
||||
}
|
||||
if (a->rm == 15) {
|
||||
rm = tcg_const_i32(0);
|
||||
rm = zero;
|
||||
} else {
|
||||
rm = load_reg(s, a->rm);
|
||||
}
|
||||
@@ -9010,10 +9011,8 @@ static bool trans_CSEL(DisasContext *s, arg_CSEL *a)
|
||||
}
|
||||
|
||||
arm_test_cc(&c, a->fcond);
|
||||
zero = tcg_const_i32(0);
|
||||
tcg_gen_movcond_i32(c.cond, rn, c.value, zero, rn, rm);
|
||||
arm_free_cc(&c);
|
||||
tcg_temp_free_i32(zero);
|
||||
|
||||
store_reg(s, a->rd, rn);
|
||||
tcg_temp_free_i32(rm);
|
||||
|
||||
Reference in new issue
Block a user