aboutsummaryrefslogtreecommitdiff
path: root/tcg
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-01-13 16:03:44 -1000
committerRichard Henderson <richard.henderson@linaro.org>2023-01-23 14:39:48 -1000
commit9fd86b518ee0abc0f0c013ce51e5384b8109d94c (patch)
tree71d05c52af26096b64ef4644e5bde2ff68fec415 /tcg
parent00b1faea41d283e931256aa78aa975a369ec3ae6 (diff)
downloadqemu-9fd86b518ee0abc0f0c013ce51e5384b8109d94c.zip
qemu-9fd86b518ee0abc0f0c013ce51e5384b8109d94c.tar.gz
qemu-9fd86b518ee0abc0f0c013ce51e5384b8109d94c.tar.bz2
tcg: Avoid recursion in tcg_gen_mulu2_i32
We have a test for one of TCG_TARGET_HAS_mulu2_i32 or TCG_TARGET_HAS_muluh_i32 being defined, but the test became non-functional when we changed to always define all of these macros. Replace this with a build-time test in tcg_gen_mulu2_i32. Fixes: 25c4d9cc845 ("tcg: Always define all of the TCGOpcode enum members.") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1435 Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg')
-rw-r--r--tcg/tcg-op.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c
index 9fa9f1b..326a918 100644
--- a/tcg/tcg-op.c
+++ b/tcg/tcg-op.c
@@ -874,7 +874,7 @@ void tcg_gen_mulu2_i32(TCGv_i32 rl, TCGv_i32 rh, TCGv_i32 arg1, TCGv_i32 arg2)
tcg_gen_op3_i32(INDEX_op_muluh_i32, rh, arg1, arg2);
tcg_gen_mov_i32(rl, t);
tcg_temp_free_i32(t);
- } else {
+ } else if (TCG_TARGET_REG_BITS == 64) {
TCGv_i64 t0 = tcg_temp_new_i64();
TCGv_i64 t1 = tcg_temp_new_i64();
tcg_gen_extu_i32_i64(t0, arg1);
@@ -883,6 +883,8 @@ void tcg_gen_mulu2_i32(TCGv_i32 rl, TCGv_i32 rh, TCGv_i32 arg1, TCGv_i32 arg2)
tcg_gen_extr_i64_i32(rl, rh, t0);
tcg_temp_free_i64(t0);
tcg_temp_free_i64(t1);
+ } else {
+ qemu_build_not_reached();
}
}