[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 26/34] target/ppc: added the instructions PLXV and PSTXV
From: |
matheus . ferst |
Subject: |
[PATCH v2 26/34] target/ppc: added the instructions PLXV and PSTXV |
Date: |
Fri, 29 Oct 2021 17:24:17 -0300 |
From: "Lucas Mateus Castro (alqotel)" <lucas.castro@eldorado.org.br>
Implemented the instructions plxv and pstxv using decodetree
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.castro@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
---
target/ppc/insn64.decode | 10 ++++++++++
target/ppc/translate/vsx-impl.c.inc | 16 ++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/target/ppc/insn64.decode b/target/ppc/insn64.decode
index 48756cd4ca..093439b370 100644
--- a/target/ppc/insn64.decode
+++ b/target/ppc/insn64.decode
@@ -23,6 +23,9 @@
@PLS_D ...... .. ... r:1 .. .................. \
...... rt:5 ra:5 ................ \
&PLS_D si=%pls_si
+@8LS_D_TSX ...... .. . .. r:1 .. .................. \
+ ..... rt:6 ra:5 ................ \
+ &PLS_D si=%pls_si
### Fixed-Point Load Instructions
@@ -137,3 +140,10 @@ PSTFD 000001 10 0--.-- .................. \
PNOP ................................ \
-------------------------------- @PNOP
}
+
+### VSX instructions
+
+PLXV 000001 00 0--.-- .................. \
+ 11001 ...... ..... ................ @8LS_D_TSX
+PSTXV 000001 00 0--.-- .................. \
+ 11011 ...... ..... ................ @8LS_D_TSX
diff --git a/target/ppc/translate/vsx-impl.c.inc
b/target/ppc/translate/vsx-impl.c.inc
index d634699e38..bbf437536e 100644
--- a/target/ppc/translate/vsx-impl.c.inc
+++ b/target/ppc/translate/vsx-impl.c.inc
@@ -2016,6 +2016,20 @@ static bool do_lstxv_D(DisasContext *ctx, arg_D *a, bool
store, bool paired)
return do_lstxv(ctx, a->ra, tcg_constant_tl(a->si), a->rt, store, paired);
}
+static bool do_lstxv_PLS_D(DisasContext *ctx, arg_PLS_D *a,
+ bool store, bool paired)
+{
+ arg_D d;
+ REQUIRE_INSNS_FLAGS2(ctx, ISA310);
+ REQUIRE_VSX(ctx);
+
+ if (!resolve_PLS_D(ctx, &d, a)) {
+ return true;
+ }
+
+ return do_lstxv(ctx, d.ra, tcg_constant_tl(d.si), d.rt, store, paired);
+}
+
static bool do_lstxv_X(DisasContext *ctx, arg_X *a, bool store, bool paired)
{
if (paired) {
@@ -2041,6 +2055,8 @@ TRANS(STXVX, do_lstxv_X, true, false)
TRANS(LXVX, do_lstxv_X, false, false)
TRANS(STXVPX, do_lstxv_X, true, true)
TRANS(LXVPX, do_lstxv_X, false, true)
+TRANS64(PSTXV, do_lstxv_PLS_D, true, false)
+TRANS64(PLXV, do_lstxv_PLS_D, false, false)
#undef GEN_XX2FORM
#undef GEN_XX3FORM
--
2.25.1
- Re: [PATCH v2 19/34] target/ppc: Implement Vector Extract Double to VSR using GPR index insns, (continued)
- [PATCH v2 20/34] target/ppc: Introduce REQUIRE_VSX macro, matheus . ferst, 2021/10/29
- [PATCH v2 21/34] target/ppc: receive high/low as argument in get/set_cpu_vsr, matheus . ferst, 2021/10/29
- [PATCH v2 22/34] target/ppc: moved stxv and lxv from legacy to decodtree, matheus . ferst, 2021/10/29
- [PATCH v2 23/34] target/ppc: moved stxvx and lxvx from legacy to decodtree, matheus . ferst, 2021/10/29
- [PATCH v2 24/34] target/ppc: added the instructions LXVP and STXVP, matheus . ferst, 2021/10/29
- [PATCH v2 25/34] target/ppc: added the instructions LXVPX and STXVPX, matheus . ferst, 2021/10/29
- [PATCH v2 26/34] target/ppc: added the instructions PLXV and PSTXV,
matheus . ferst <=
- [PATCH v2 27/34] target/ppc: added the instructions PLXVP and PSTXVP, matheus . ferst, 2021/10/29
- [PATCH v2 28/34] target/ppc: moved XXSPLTW to using decodetree, matheus . ferst, 2021/10/29
- [PATCH v2 29/34] target/ppc: moved XXSPLTIB to using decodetree, matheus . ferst, 2021/10/29
- [PATCH v2 30/34] target/ppc: implemented XXSPLTI32DX, matheus . ferst, 2021/10/29
- [PATCH v2 31/34] target/ppc: Implemented XXSPLTIW using decodetree, matheus . ferst, 2021/10/29
- [PATCH v2 32/34] target/ppc: implemented XXSPLTIDP instruction, matheus . ferst, 2021/10/29
- [PATCH v2 33/34] target/ppc: Implement xxblendvb/xxblendvh/xxblendvw/xxblendvd instructions, matheus . ferst, 2021/10/29
- [PATCH v2 34/34] target/ppc: Implement lxvkq instruction, matheus . ferst, 2021/10/29
- Re: [PATCH v2 00/34] PowerISA v3.1 instruction batch, David Gibson, 2021/10/31