aboutsummaryrefslogtreecommitdiff
path: root/target/mips
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-08-15 15:56:13 +0200
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-08-25 13:02:14 +0200
commita8b18de7f5f8283633e5fc3378fbd6d0c9f4a1ae (patch)
tree0cbd19438afe21902aa4a8cc075ba7c8eca8ee6f /target/mips
parentae71abadd58037dd457f021f9be381e32f1815ec (diff)
downloadqemu-a8b18de7f5f8283633e5fc3378fbd6d0c9f4a1ae.zip
qemu-a8b18de7f5f8283633e5fc3378fbd6d0c9f4a1ae.tar.gz
qemu-a8b18de7f5f8283633e5fc3378fbd6d0c9f4a1ae.tar.bz2
target/mips: Use tcg_constant_i32() in generate_exception_err()
excp/err are temporaries input, so we can replace tcg_const_i32() calls by tcg_constant_i32() equivalent. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210816205107.2051495-8-f4bug@amsat.org>
Diffstat (limited to 'target/mips')
-rw-r--r--target/mips/tcg/translate.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c
index c515a33..93b72c9 100644
--- a/target/mips/tcg/translate.c
+++ b/target/mips/tcg/translate.c
@@ -1363,12 +1363,9 @@ static inline void restore_cpu_state(CPUMIPSState *env, DisasContext *ctx)
void generate_exception_err(DisasContext *ctx, int excp, int err)
{
- TCGv_i32 texcp = tcg_const_i32(excp);
- TCGv_i32 terr = tcg_const_i32(err);
save_cpu_state(ctx, 1);
- gen_helper_raise_exception_err(cpu_env, texcp, terr);
- tcg_temp_free_i32(terr);
- tcg_temp_free_i32(texcp);
+ gen_helper_raise_exception_err(cpu_env, tcg_constant_i32(excp),
+ tcg_constant_i32(err));
ctx->base.is_jmp = DISAS_NORETURN;
}