[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 34/37] target/ppc: Move xs{max, min}[cj]dp to use do_helper_XX3
From: |
matheus . ferst |
Subject: |
[PATCH 34/37] target/ppc: Move xs{max, min}[cj]dp to use do_helper_XX3 |
Date: |
Fri, 7 Jan 2022 15:56:50 -0300 |
From: Víctor Colombo <victor.colombo@eldorado.org.br>
Also, fixes these instructions not being capitalized.
Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
---
target/ppc/fpu_helper.c | 8 ++++----
target/ppc/helper.h | 8 ++++----
target/ppc/translate/vsx-impl.c.inc | 30 ++++-------------------------
3 files changed, 12 insertions(+), 34 deletions(-)
diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c
index 75bd7de15a..24072cacee 100644
--- a/target/ppc/fpu_helper.c
+++ b/target/ppc/fpu_helper.c
@@ -2569,8 +2569,8 @@ void helper_##name(CPUPPCState *env,
\
} \
} \
-VSX_MAX_MINC(xsmaxcdp, 1);
-VSX_MAX_MINC(xsmincdp, 0);
+VSX_MAX_MINC(XSMAXCDP, 1);
+VSX_MAX_MINC(XSMINCDP, 0);
#define VSX_MAX_MINJ(name, max) \
void helper_##name(CPUPPCState *env, \
@@ -2624,8 +2624,8 @@ void helper_##name(CPUPPCState *env,
\
} \
} \
-VSX_MAX_MINJ(xsmaxjdp, 1);
-VSX_MAX_MINJ(xsminjdp, 0);
+VSX_MAX_MINJ(XSMAXJDP, 1);
+VSX_MAX_MINJ(XSMINJDP, 0);
/*
* VSX_CMP - VSX floating point compare
diff --git a/target/ppc/helper.h b/target/ppc/helper.h
index 1df77748aa..690ba1387e 100644
--- a/target/ppc/helper.h
+++ b/target/ppc/helper.h
@@ -381,10 +381,10 @@ DEF_HELPER_4(xscmpoqp, void, env, i32, vsr, vsr)
DEF_HELPER_4(xscmpuqp, void, env, i32, vsr, vsr)
DEF_HELPER_4(xsmaxdp, void, env, vsr, vsr, vsr)
DEF_HELPER_4(xsmindp, void, env, vsr, vsr, vsr)
-DEF_HELPER_4(xsmaxcdp, void, env, vsr, vsr, vsr)
-DEF_HELPER_4(xsmincdp, void, env, vsr, vsr, vsr)
-DEF_HELPER_4(xsmaxjdp, void, env, vsr, vsr, vsr)
-DEF_HELPER_4(xsminjdp, void, env, vsr, vsr, vsr)
+DEF_HELPER_4(XSMAXCDP, void, env, vsr, vsr, vsr)
+DEF_HELPER_4(XSMINCDP, void, env, vsr, vsr, vsr)
+DEF_HELPER_4(XSMAXJDP, void, env, vsr, vsr, vsr)
+DEF_HELPER_4(XSMINJDP, void, env, vsr, vsr, vsr)
DEF_HELPER_3(xscvdphp, void, env, vsr, vsr)
DEF_HELPER_4(xscvdpqp, void, env, i32, vsr, vsr)
DEF_HELPER_3(xscvdpsp, void, env, vsr, vsr)
diff --git a/target/ppc/translate/vsx-impl.c.inc
b/target/ppc/translate/vsx-impl.c.inc
index bbe5a70e71..a4b7de5f49 100644
--- a/target/ppc/translate/vsx-impl.c.inc
+++ b/target/ppc/translate/vsx-impl.c.inc
@@ -1183,6 +1183,10 @@ TRANS(XSCMPEQDP, do_helper_XX3, gen_helper_XSCMPEQDP)
TRANS(XSCMPGEDP, do_helper_XX3, gen_helper_XSCMPGEDP)
TRANS(XSCMPGTDP, do_helper_XX3, gen_helper_XSCMPGTDP)
TRANS(XSCMPNEDP, do_helper_XX3, gen_helper_XSCMPNEDP)
+TRANS(XSMAXCDP, do_helper_XX3, gen_helper_XSMAXCDP)
+TRANS(XSMINCDP, do_helper_XX3, gen_helper_XSMINCDP)
+TRANS(XSMAXJDP, do_helper_XX3, gen_helper_XSMAXJDP)
+TRANS(XSMINJDP, do_helper_XX3, gen_helper_XSMINJDP)
static bool trans_XXPERMDI(DisasContext *ctx, arg_XX3_dm *a)
{
@@ -2456,32 +2460,6 @@ TRANS(XXBLENDVH, do_xxblendv, MO_16)
TRANS(XXBLENDVW, do_xxblendv, MO_32)
TRANS(XXBLENDVD, do_xxblendv, MO_64)
-static bool do_xsmaxmincjdp(DisasContext *ctx, arg_XX3 *a,
- void (*helper)(TCGv_ptr, TCGv_ptr, TCGv_ptr,
TCGv_ptr))
-{
- 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);
-
- helper(cpu_env, xt, xa, xb);
-
- tcg_temp_free_ptr(xt);
- tcg_temp_free_ptr(xa);
- tcg_temp_free_ptr(xb);
-
- return true;
-}
-
-TRANS(XSMAXCDP, do_xsmaxmincjdp, gen_helper_xsmaxcdp)
-TRANS(XSMINCDP, do_xsmaxmincjdp, gen_helper_xsmincdp)
-TRANS(XSMAXJDP, do_xsmaxmincjdp, gen_helper_xsmaxjdp)
-TRANS(XSMINJDP, do_xsmaxmincjdp, gen_helper_xsminjdp)
-
static bool do_helper_X(arg_X *a,
void (*helper)(TCGv_ptr, TCGv_ptr, TCGv_ptr, TCGv_ptr))
{
--
2.25.1
- [PATCH 23/37] target/ppc: Implement xxpermx instruction, (continued)
- [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, 2022/01/07
- [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 <=
- [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