aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-08-15 15:07:40 +0200
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-08-25 13:02:14 +0200
commit26fe92763aaf3b0d704fbdb32daf434147dc6ca7 (patch)
tree7ddd4570039c6e4b2f5a0d6f4b1fc5a204bbb40d /target
parent78bdd3886577ce4f3e573685b155622e19bcca38 (diff)
downloadqemu-26fe92763aaf3b0d704fbdb32daf434147dc6ca7.zip
qemu-26fe92763aaf3b0d704fbdb32daf434147dc6ca7.tar.gz
qemu-26fe92763aaf3b0d704fbdb32daf434147dc6ca7.tar.bz2
target/mips: Simplify gen_helper() macros by using tcg_constant_i32()
In all call sites the last argument is always used as a read-only value, so we can replace tcg_const_i32() temporary by tcg_constant_i32(). Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210816205107.2051495-5-f4bug@amsat.org>
Diffstat (limited to 'target')
-rw-r--r--target/mips/tcg/translate.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c
index a6df9be..3417fc4 100644
--- a/target/mips/tcg/translate.c
+++ b/target/mips/tcg/translate.c
@@ -1214,33 +1214,23 @@ TCGv_i64 fpu_f64[32];
#include "exec/gen-icount.h"
#define gen_helper_0e0i(name, arg) do { \
- TCGv_i32 helper_tmp = tcg_const_i32(arg); \
- gen_helper_##name(cpu_env, helper_tmp); \
- tcg_temp_free_i32(helper_tmp); \
+ gen_helper_##name(cpu_env, tcg_constant_i32(arg)); \
} while (0)
#define gen_helper_0e1i(name, arg1, arg2) do { \
- TCGv_i32 helper_tmp = tcg_const_i32(arg2); \
- gen_helper_##name(cpu_env, arg1, helper_tmp); \
- tcg_temp_free_i32(helper_tmp); \
+ gen_helper_##name(cpu_env, arg1, tcg_constant_i32(arg2)); \
} while (0)
#define gen_helper_1e0i(name, ret, arg1) do { \
- TCGv_i32 helper_tmp = tcg_const_i32(arg1); \
- gen_helper_##name(ret, cpu_env, helper_tmp); \
- tcg_temp_free_i32(helper_tmp); \
+ gen_helper_##name(ret, cpu_env, tcg_constant_i32(arg1)); \
} while (0)
#define gen_helper_1e1i(name, ret, arg1, arg2) do { \
- TCGv_i32 helper_tmp = tcg_const_i32(arg2); \
- gen_helper_##name(ret, cpu_env, arg1, helper_tmp); \
- tcg_temp_free_i32(helper_tmp); \
+ gen_helper_##name(ret, cpu_env, arg1, tcg_constant_i32(arg2));\
} while (0)
#define gen_helper_0e2i(name, arg1, arg2, arg3) do { \
- TCGv_i32 helper_tmp = tcg_const_i32(arg3); \
- gen_helper_##name(cpu_env, arg1, arg2, helper_tmp); \
- tcg_temp_free_i32(helper_tmp); \
+ gen_helper_##name(cpu_env, arg1, arg2, tcg_constant_i32(arg3));\
} while (0)
#define DISAS_STOP DISAS_TARGET_0