[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 32/37] target/ppc: Implement do_helper_XX3 and move xxperm* to us
From: |
matheus . ferst |
Subject: |
[PATCH 32/37] target/ppc: Implement do_helper_XX3 and move xxperm* to use it |
Date: |
Fri, 7 Jan 2022 15:56:48 -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 69bfa742b7..b31e363c1b 100644
--- a/target/ppc/translate/vsx-impl.c.inc
+++ b/target/ppc/translate/vsx-impl.c.inc
@@ -1160,7 +1160,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;
@@ -1171,7 +1172,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);
@@ -1180,25 +1181,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 22/37] target/ppc: Move xxpermdi to decodetree, (continued)
- [PATCH 22/37] target/ppc: Move xxpermdi to decodetree, matheus . ferst, 2022/01/07
- [PATCH 25/37] target/ppc: Implement xxeval, matheus . ferst, 2022/01/07
- [PATCH 23/37] target/ppc: Implement xxpermx instruction, matheus . ferst, 2022/01/07
- [PATCH 24/37] tcg/tcg-op-gvec.c: Introduce tcg_gen_gvec_4i, matheus . ferst, 2022/01/07
- [PATCH 26/37] target/ppc: Implement xxgenpcv[bhwd]m instruction, matheus . ferst, 2022/01/07
- [PATCH 27/37] target/ppc: move xs[n]madd[am][ds]p/xs[n]msub[am][ds]p to decodetree, matheus . ferst, 2022/01/07
- [PATCH 28/37] target/ppc: implement xs[n]maddqp[o]/xs[n]msubqp[o], matheus . ferst, 2022/01/07
- [PATCH 29/37] target/ppc: Implement xvtlsbb instruction, matheus . ferst, 2022/01/07
- [PATCH 30/37] target/ppc: Refactor VSX_SCALAR_CMP_DP, matheus . ferst, 2022/01/07
- [PATCH 31/37] target/ppc: Implement xscmp{eq,ge,gt}qp, matheus . ferst, 2022/01/07
- [PATCH 32/37] target/ppc: Implement do_helper_XX3 and move xxperm* to use it,
matheus . ferst <=
- [PATCH 33/37] target/ppc: Move xscmp{eq,ge,gt,ne}dp to decodetree, matheus . ferst, 2022/01/07
- [PATCH 34/37] target/ppc: Move xs{max, min}[cj]dp to use do_helper_XX3, matheus . ferst, 2022/01/07
- [PATCH 35/37] target/ppc: Refactor VSX_MAX_MINC helper, matheus . ferst, 2022/01/07
- [PATCH 36/37] target/ppc: Implement xs{max,min}cqp, matheus . ferst, 2022/01/07
- [PATCH 37/37] target/ppc: Implement xvcvbf16spn and xvcvspbf16 instructions, matheus . ferst, 2022/01/07
- Re: [PATCH 00/37] target/ppc: PowerISA Vector/VSX instruction batch, Daniel Henrique Barboza, 2022/01/10
- Re: [PATCH 00/37] target/ppc: PowerISA Vector/VSX instruction batch, Cédric Le Goater, 2022/01/24
- Prev by Date:
[PATCH 31/37] target/ppc: Implement xscmp{eq,ge,gt}qp
- Next by Date:
[PATCH 33/37] target/ppc: Move xscmp{eq,ge,gt,ne}dp to decodetree
- Previous by thread:
[PATCH 31/37] target/ppc: Implement xscmp{eq,ge,gt}qp
- Next by thread:
[PATCH 33/37] target/ppc: Move xscmp{eq,ge,gt,ne}dp to decodetree
- Index(es):