[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 19/34] target/ppc: introduce do_va_helper
From: |
Daniel Henrique Barboza |
Subject: |
[PULL 19/34] target/ppc: introduce do_va_helper |
Date: |
Thu, 26 May 2022 18:38:00 -0300 |
From: Matheus Ferst <matheus.ferst@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220517123929.284511-10-matheus.ferst@eldorado.org.br>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
target/ppc/translate/vmx-impl.c.inc | 32 +++++------------------------
1 file changed, 5 insertions(+), 27 deletions(-)
diff --git a/target/ppc/translate/vmx-impl.c.inc
b/target/ppc/translate/vmx-impl.c.inc
index 764ac45409..e66301c007 100644
--- a/target/ppc/translate/vmx-impl.c.inc
+++ b/target/ppc/translate/vmx-impl.c.inc
@@ -2553,20 +2553,17 @@ static void gen_vmladduhm(DisasContext *ctx)
tcg_temp_free_ptr(rd);
}
-static bool trans_VPERM(DisasContext *ctx, arg_VA *a)
+static bool do_va_helper(DisasContext *ctx, arg_VA *a,
+ void (*gen_helper)(TCGv_ptr, TCGv_ptr, TCGv_ptr, TCGv_ptr))
{
TCGv_ptr vrt, vra, vrb, vrc;
-
- REQUIRE_INSNS_FLAGS(ctx, ALTIVEC);
REQUIRE_VECTOR(ctx);
vrt = gen_avr_ptr(a->vrt);
vra = gen_avr_ptr(a->vra);
vrb = gen_avr_ptr(a->vrb);
vrc = gen_avr_ptr(a->rc);
-
- gen_helper_VPERM(vrt, vra, vrb, vrc);
-
+ gen_helper(vrt, vra, vrb, vrc);
tcg_temp_free_ptr(vrt);
tcg_temp_free_ptr(vra);
tcg_temp_free_ptr(vrb);
@@ -2575,27 +2572,8 @@ static bool trans_VPERM(DisasContext *ctx, arg_VA *a)
return true;
}
-static bool trans_VPERMR(DisasContext *ctx, arg_VA *a)
-{
- TCGv_ptr vrt, vra, vrb, vrc;
-
- REQUIRE_INSNS_FLAGS2(ctx, ISA300);
- REQUIRE_VECTOR(ctx);
-
- vrt = gen_avr_ptr(a->vrt);
- vra = gen_avr_ptr(a->vra);
- vrb = gen_avr_ptr(a->vrb);
- vrc = gen_avr_ptr(a->rc);
-
- gen_helper_VPERMR(vrt, vra, vrb, vrc);
-
- tcg_temp_free_ptr(vrt);
- tcg_temp_free_ptr(vra);
- tcg_temp_free_ptr(vrb);
- tcg_temp_free_ptr(vrc);
-
- return true;
-}
+TRANS_FLAGS(ALTIVEC, VPERM, do_va_helper, gen_helper_VPERM)
+TRANS_FLAGS2(ISA300, VPERMR, do_va_helper, gen_helper_VPERMR)
static bool trans_VSEL(DisasContext *ctx, arg_VA *a)
{
--
2.36.1
- [PULL 04/34] spapr/docs: Add a few words about x-vof, (continued)
- [PULL 04/34] spapr/docs: Add a few words about x-vof, Daniel Henrique Barboza, 2022/05/26
- [PULL 05/34] mos6522: fix linking error when CONFIG_MOS6522 is not set, Daniel Henrique Barboza, 2022/05/26
- [PULL 06/34] target/ppc: Fix tlbie, Daniel Henrique Barboza, 2022/05/26
- [PULL 07/34] target/ppc: Fix FPSCR.FI bit being cleared when it shouldn't, Daniel Henrique Barboza, 2022/05/26
- [PULL 09/34] target/ppc: Rename sfprf to sfifprf where it's also used as set fi flag, Daniel Henrique Barboza, 2022/05/26
- [PULL 10/34] pnv/xive2: Don't overwrite PC registers when writing TCTXT registers, Daniel Henrique Barboza, 2022/05/26
- [PULL 08/34] target/ppc: Fix FPSCR.FI changing in float_overflow_excp(), Daniel Henrique Barboza, 2022/05/26
- [PULL 11/34] target/ppc: declare darn32/darn64 helpers with TCG_CALL_NO_RWG, Daniel Henrique Barboza, 2022/05/26
- [PULL 13/34] target/ppc: use TCG_CALL_NO_RWG in BCD helpers, Daniel Henrique Barboza, 2022/05/26
- [PULL 15/34] target/ppc: Use TCG_CALL_NO_RWG_SE in fsel helper, Daniel Henrique Barboza, 2022/05/26
- [PULL 19/34] target/ppc: introduce do_va_helper,
Daniel Henrique Barboza <=
- [PULL 20/34] target/ppc: declare vmsum[um]bm helpers with call flags, Daniel Henrique Barboza, 2022/05/26
- [PULL 12/34] target/ppc: use TCG_CALL_NO_RWG in vector helpers without env, Daniel Henrique Barboza, 2022/05/26
- [PULL 14/34] target/ppc: use TCG_CALL_NO_RWG in VSX helpers without env, Daniel Henrique Barboza, 2022/05/26
- [PULL 16/34] target/ppc: declare xscvspdpn helper with call flags, Daniel Henrique Barboza, 2022/05/26
- [PULL 25/34] tcg/ppc: Optimize memory ordering generation with lwsync, Daniel Henrique Barboza, 2022/05/26
- [PULL 17/34] target/ppc: declare xvxsigsp helper with call flags, Daniel Henrique Barboza, 2022/05/26
- [PULL 18/34] target/ppc: declare xxextractuw and xxinsertw helpers with call flags, Daniel Henrique Barboza, 2022/05/26
- [PULL 21/34] target/ppc: declare vmsumuh[ms] helper with call flags, Daniel Henrique Barboza, 2022/05/26
- [PULL 26/34] target/ppc: Implement lwsync with weaker memory ordering, Daniel Henrique Barboza, 2022/05/26
- [PULL 24/34] tcg/ppc: ST_ST memory ordering is not provided with eieio, Daniel Henrique Barboza, 2022/05/26