[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 33/38] target/ppc: Implement do_helper_XX3 and move xxperm* to
From: |
matheus . ferst |
Subject: |
[PATCH v2 33/38] target/ppc: Implement do_helper_XX3 and move xxperm* to use it |
Date: |
Tue, 25 Jan 2022 09:19:38 -0300 |
From: Víctor Colombo <victor.colombo@eldorado.org.br>
do_helper_XX3 is a wrapper for instructions that only call its helper.
It will be used later to implement instructions like xscmp*dp.
Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
---
target/ppc/translate/vsx-impl.c.inc | 26 +++++---------------------
1 file changed, 5 insertions(+), 21 deletions(-)
diff --git a/target/ppc/translate/vsx-impl.c.inc
b/target/ppc/translate/vsx-impl.c.inc
index e1fea01a3a..330411f8a6 100644
--- a/target/ppc/translate/vsx-impl.c.inc
+++ b/target/ppc/translate/vsx-impl.c.inc
@@ -1159,7 +1159,8 @@ GEN_VSX_HELPER_X2(xvrspiz, 0x12, 0x09, 0, PPC2_VSX)
GEN_VSX_HELPER_2(xvtstdcsp, 0x14, 0x1A, 0, PPC2_VSX)
GEN_VSX_HELPER_2(xvtstdcdp, 0x14, 0x1E, 0, PPC2_VSX)
-static bool trans_XXPERM(DisasContext *ctx, arg_XX3 *a)
+static bool do_helper_XX3(DisasContext *ctx, arg_XX3 *a,
+ void (*helper)(TCGv_ptr, TCGv_ptr, TCGv_ptr, TCGv_ptr))
{
TCGv_ptr xt, xa, xb;
@@ -1170,7 +1171,7 @@ static bool trans_XXPERM(DisasContext *ctx, arg_XX3 *a)
xa = gen_vsr_ptr(a->xa);
xb = gen_vsr_ptr(a->xb);
- gen_helper_VPERM(xt, xa, xt, xb);
+ helper(cpu_env, xt, xa, xb);
tcg_temp_free_ptr(xt);
tcg_temp_free_ptr(xa);
@@ -1179,25 +1180,8 @@ static bool trans_XXPERM(DisasContext *ctx, arg_XX3 *a)
return true;
}
-static bool trans_XXPERMR(DisasContext *ctx, arg_XX3 *a)
-{
- TCGv_ptr xt, xa, xb;
-
- REQUIRE_INSNS_FLAGS2(ctx, ISA300);
- REQUIRE_VSX(ctx);
-
- xt = gen_vsr_ptr(a->xt);
- xa = gen_vsr_ptr(a->xa);
- xb = gen_vsr_ptr(a->xb);
-
- gen_helper_VPERMR(xt, xa, xt, xb);
-
- tcg_temp_free_ptr(xt);
- tcg_temp_free_ptr(xa);
- tcg_temp_free_ptr(xb);
-
- return true;
-}
+TRANS(XXPERM, do_helper_XX3, gen_helper_VPERM);
+TRANS(XXPERMR, do_helper_XX3, gen_helper_VPERMR);
static bool trans_XXPERMDI(DisasContext *ctx, arg_XX3_dm *a)
{
--
2.25.1
- [PATCH v2 21/38] target/ppc: move xxperm/xxpermr to decodetree, (continued)
- [PATCH v2 21/38] target/ppc: move xxperm/xxpermr to decodetree, matheus . ferst, 2022/01/25
- [PATCH v2 22/38] target/ppc: Move xxpermdi to decodetree, matheus . ferst, 2022/01/25
- [PATCH v2 25/38] target/ppc: Implement xxeval, matheus . ferst, 2022/01/25
- [PATCH v2 24/38] tcg/tcg-op-gvec.c: Introduce tcg_gen_gvec_4i, matheus . ferst, 2022/01/25
- [PATCH v2 26/38] target/ppc: Implement xxgenpcv[bhwd]m instruction, matheus . ferst, 2022/01/25
- [PATCH v2 27/38] target/ppc: move xs[n]madd[am][ds]p/xs[n]msub[am][ds]p to decodetree, matheus . ferst, 2022/01/25
- [PATCH v2 28/38] target/ppc: implement xs[n]maddqp[o]/xs[n]msubqp[o], matheus . ferst, 2022/01/25
- [PATCH v2 29/38] target/ppc: Implement xvtlsbb instruction, matheus . ferst, 2022/01/25
- [PATCH v2 31/38] target/ppc: Refactor VSX_SCALAR_CMP_DP, matheus . ferst, 2022/01/25
- [PATCH v2 32/38] target/ppc: Implement xscmp{eq,ge,gt}qp, matheus . ferst, 2022/01/25
- [PATCH v2 33/38] target/ppc: Implement do_helper_XX3 and move xxperm* to use it,
matheus . ferst <=
- [PATCH v2 34/38] target/ppc: Move xscmp{eq,ge,gt}dp to decodetree, matheus . ferst, 2022/01/25
- [PATCH v2 38/38] target/ppc: Implement xvcvbf16spn and xvcvspbf16 instructions, matheus . ferst, 2022/01/25
- [PATCH v2 37/38] target/ppc: Implement xs{max,min}cqp, matheus . ferst, 2022/01/25
- [PATCH v2 36/38] target/ppc: Refactor VSX_MAX_MINC helper, matheus . ferst, 2022/01/25
- [PATCH v2 35/38] target/ppc: Move xs{max, min}[cj]dp to use do_helper_XX3, matheus . ferst, 2022/01/25
- [PATCH v2 30/38] target/ppc: Remove xscmpnedp instruction, matheus . ferst, 2022/01/25
- [PATCH v2 10/38] target/ppc: Move Vector Compare Not Equal or Zero to decodetree, matheus . ferst, 2022/01/25
- [PATCH v2 03/38] target/ppc: Moved vector multiply high and low to decodetree, matheus . ferst, 2022/01/25
- [PATCH v2 02/38] target/ppc: moved vector even and odd multiplication to decodetree, matheus . ferst, 2022/01/25
- [PATCH v2 01/38] target/ppc: Introduce TRANS*FLAGS macros, matheus . ferst, 2022/01/25