aboutsummaryrefslogtreecommitdiff
path: root/target/ppc/translate/fixedpoint-impl.c.inc
diff options
context:
space:
mode:
authorFernando Eckhardt Valle <phervalle@gmail.com>2021-10-29 17:23:51 -0300
committerDavid Gibson <david@gibson.dropbear.id.au>2021-11-09 10:32:51 +1100
commiteb63efd9f63fabc2ce7ee070f1d8e75585d26543 (patch)
tree3d8981d3a2fd6c65f02ce217fedb76f2f15fe038 /target/ppc/translate/fixedpoint-impl.c.inc
parent114f3c8cc427333dbae331dfd2ecae64676b087e (diff)
downloadqemu-eb63efd9f63fabc2ce7ee070f1d8e75585d26543.zip
qemu-eb63efd9f63fabc2ce7ee070f1d8e75585d26543.tar.gz
qemu-eb63efd9f63fabc2ce7ee070f1d8e75585d26543.tar.bz2
target/ppc: introduce do_ea_calc
The do_ea_calc function will calculate the effective address(EA) according to PowerIsa 3.1. With that, it was replaced part of do_ldst() that calculates the EA by this new function. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Fernando Eckhardt Valle (pherde) <phervalle@gmail.com> Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br> Message-Id: <20211029202424.175401-2-matheus.ferst@eldorado.org.br> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc/translate/fixedpoint-impl.c.inc')
-rw-r--r--target/ppc/translate/fixedpoint-impl.c.inc10
1 files changed, 1 insertions, 9 deletions
diff --git a/target/ppc/translate/fixedpoint-impl.c.inc b/target/ppc/translate/fixedpoint-impl.c.inc
index 2e2518e..caef5d8 100644
--- a/target/ppc/translate/fixedpoint-impl.c.inc
+++ b/target/ppc/translate/fixedpoint-impl.c.inc
@@ -51,15 +51,7 @@ static bool do_ldst(DisasContext *ctx, int rt, int ra, TCGv displ, bool update,
}
gen_set_access_type(ctx, ACCESS_INT);
- ea = tcg_temp_new();
- if (ra) {
- tcg_gen_add_tl(ea, cpu_gpr[ra], displ);
- } else {
- tcg_gen_mov_tl(ea, displ);
- }
- if (NARROW_MODE(ctx)) {
- tcg_gen_ext32u_tl(ea, ea);
- }
+ ea = do_ea_calc(ctx, ra, displ);
mop ^= ctx->default_tcg_memop_mask;
if (store) {
tcg_gen_qemu_st_tl(cpu_gpr[rt], ea, ctx->mem_idx, mop);