[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/8] target/mips: Use tcg_constant_i32() in gen_helper_0e2i()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 3/8] target/mips: Use tcg_constant_i32() in gen_helper_0e2i() |
Date: |
Mon, 16 Aug 2021 22:51:02 +0200 |
$rt register is used read-only, so we can replace tcg_const_i32()
temporary by tcg_constant_i32().
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/mips/tcg/translate.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c
index 4b689a54abb..a6df9beb670 100644
--- a/target/mips/tcg/translate.c
+++ b/target/mips/tcg/translate.c
@@ -9072,12 +9072,7 @@ static void gen_mttr(CPUMIPSState *env, DisasContext
*ctx, int rd, int rt,
break;
case 3:
/* XXX: For now we support only a single FPU context. */
- {
- TCGv_i32 fs_tmp = tcg_const_i32(rd);
-
- gen_helper_0e2i(ctc1, t0, fs_tmp, rt);
- tcg_temp_free_i32(fs_tmp);
- }
+ gen_helper_0e2i(ctc1, t0, tcg_constant_i32(rd), rt);
/* Stop translation as we may have changed hflags */
ctx->base.is_jmp = DISAS_STOP;
break;
@@ -9694,12 +9689,7 @@ static void gen_cp1(DisasContext *ctx, uint32_t opc, int
rt, int fs)
case OPC_CTC1:
gen_load_gpr(t0, rt);
save_cpu_state(ctx, 0);
- {
- TCGv_i32 fs_tmp = tcg_const_i32(fs);
-
- gen_helper_0e2i(ctc1, t0, fs_tmp, rt);
- tcg_temp_free_i32(fs_tmp);
- }
+ gen_helper_0e2i(ctc1, t0, tcg_constant_i32(fs), rt);
/* Stop translation as we may have changed hflags */
ctx->base.is_jmp = DISAS_STOP;
break;
--
2.31.1
- [PATCH 0/8] target/mips: Housekeeping in gen_helper() macros, Philippe Mathieu-Daudé, 2021/08/16
- [PATCH 1/8] target/mips: Remove gen_helper_0e3i(), Philippe Mathieu-Daudé, 2021/08/16
- [PATCH 3/8] target/mips: Use tcg_constant_i32() in gen_helper_0e2i(),
Philippe Mathieu-Daudé <=
- [PATCH 2/8] target/mips: Remove gen_helper_1e2i(), Philippe Mathieu-Daudé, 2021/08/16
- [PATCH 4/8] target/mips: Simplify gen_helper() macros by using tcg_constant_i32(), Philippe Mathieu-Daudé, 2021/08/16
- [PATCH 5/8] target/mips: Inline gen_helper_1e1i() call in op_ld_INSN() macros, Philippe Mathieu-Daudé, 2021/08/16
- [PATCH 6/8] target/mips: Inline gen_helper_0e0i(), Philippe Mathieu-Daudé, 2021/08/16
- [PATCH 7/8] target/mips: Use tcg_constant_i32() in generate_exception_err(), Philippe Mathieu-Daudé, 2021/08/16
- [PATCH 8/8] target/mips: Define gen_helper() macros in translate.h, Philippe Mathieu-Daudé, 2021/08/16
- Re: [PATCH 0/8] target/mips: Housekeeping in gen_helper() macros, Richard Henderson, 2021/08/17