[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 43/70] target/ppc: Fix gen_tlbsx_booke206
From: |
Richard Henderson |
Subject: |
[PATCH 43/70] target/ppc: Fix gen_tlbsx_booke206 |
Date: |
Sun, 26 Feb 2023 19:42:06 -1000 |
Fix incorrect read from rD.
Avoid adding 0 when rA == 0.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/ppc/translate.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index f74f3b8f0d..52b812a01f 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -5867,12 +5867,10 @@ static void gen_tlbsx_booke206(DisasContext *ctx)
CHK_SV(ctx);
if (rA(ctx->opcode)) {
t0 = tcg_temp_new();
- tcg_gen_mov_tl(t0, cpu_gpr[rD(ctx->opcode)]);
+ tcg_gen_add_tl(t0, cpu_gpr[rA(ctx->opcode)], cpu_gpr[rB(ctx->opcode)]);
} else {
- t0 = tcg_const_tl(0);
+ t0 = cpu_gpr[rB(ctx->opcode)];
}
-
- tcg_gen_add_tl(t0, t0, cpu_gpr[rB(ctx->opcode)]);
gen_helper_booke206_tlbsx(cpu_env, t0);
#endif /* defined(CONFIG_USER_ONLY) */
}
--
2.34.1
- [PATCH 32/70] target/mips: Avoid tcg_const_tl in gen_r6_ld, (continued)
- [PATCH 32/70] target/mips: Avoid tcg_const_tl in gen_r6_ld, Richard Henderson, 2023/02/27
- [PATCH 33/70] target/mips: Avoid tcg_const_* throughout, Richard Henderson, 2023/02/27
- [PATCH 35/70] target/ppc: Avoid tcg_const_i64 in do_vector_shift_quad, Richard Henderson, 2023/02/27
- [PATCH 37/70] target/ppc: Avoid tcg_const_* in vmx-impl.c.inc, Richard Henderson, 2023/02/27
- [PATCH 36/70] target/ppc: Avoid tcg_const_i64 in do_vcntmb, Richard Henderson, 2023/02/27
- [PATCH 38/70] target/ppc: Avoid tcg_const_* in xxeval, Richard Henderson, 2023/02/27
- [PATCH 39/70] target/ppc: Avoid tcg_const_* in vsx-impl.c.inc, Richard Henderson, 2023/02/27
- [PATCH 40/70] target/ppc: Avoid tcg_const_* in fp-impl.c.inc, Richard Henderson, 2023/02/27
- [PATCH 41/70] target/ppc: Avoid tcg_const_* in power8-pmu-regs.c.inc, Richard Henderson, 2023/02/27
- [PATCH 42/70] target/ppc: Rewrite trans_ADDG6S, Richard Henderson, 2023/02/27
- [PATCH 43/70] target/ppc: Fix gen_tlbsx_booke206,
Richard Henderson <=
- [PATCH 45/70] target/riscv: Avoid tcg_const_*, Richard Henderson, 2023/02/27
- [PATCH 44/70] target/ppc: Avoid tcg_const_* in translate.c, Richard Henderson, 2023/02/27
- [PATCH 49/70] target/rx: Avoid tcg_const_i32, Richard Henderson, 2023/02/27
- [PATCH 46/70] target/rx: Use tcg_gen_abs_i32, Richard Henderson, 2023/02/27
- [PATCH 47/70] target/rx: Use cpu_psw_z as temp in flags computation, Richard Henderson, 2023/02/27
- [PATCH 48/70] target/rx: Avoid tcg_const_i32 when new temp needed, Richard Henderson, 2023/02/27
- [PATCH 50/70] target/s390x: Split out gen_ri2, Richard Henderson, 2023/02/27
- [PATCH 53/70] target/sh4: Avoid tcg_const_i32, Richard Henderson, 2023/02/27