[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 04/33] target/ppc: Implement PLFS, PLFD, PSTFS and PSTFD instruct
From: |
matheus . ferst |
Subject: |
[PATCH 04/33] target/ppc: Implement PLFS, PLFD, PSTFS and PSTFD instructions |
Date: |
Thu, 21 Oct 2021 16:45:18 -0300 |
From: pherde <phervalle@gmail.com>
Signed-off-by: Fernando Eckhardt Valle <fernando.valle@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
---
target/ppc/insn64.decode | 11 +++++++++++
target/ppc/translate/fp-impl.c.inc | 14 ++++++++++++++
2 files changed, 25 insertions(+)
diff --git a/target/ppc/insn64.decode b/target/ppc/insn64.decode
index 72c5944a53..11e5ea81d6 100644
--- a/target/ppc/insn64.decode
+++ b/target/ppc/insn64.decode
@@ -56,6 +56,17 @@ PSTD 000001 00 0--.-- .................. \
PADDI 000001 10 0--.-- .................. \
001110 ..... ..... ................ @PLS_D
+### Float-Point Load and Store Instructions
+
+PLFS 000001 10 0--.-- .................. \
+ 110000 ..... ..... ................ @PLS_D
+PLFD 000001 10 0--.-- .................. \
+ 110010 ..... ..... ................ @PLS_D
+PSTFS 000001 10 0--.-- .................. \
+ 110100 ..... ..... ................ @PLS_D
+PSTFD 000001 10 0--.-- .................. \
+ 110110 ..... ..... ................ @PLS_D
+
### Prefixed No-operation Instruction
@PNOP 000001 11 0000-- 000000000000000000 \
diff --git a/target/ppc/translate/fp-impl.c.inc
b/target/ppc/translate/fp-impl.c.inc
index 76b382ebe5..b9ced292df 100644
--- a/target/ppc/translate/fp-impl.c.inc
+++ b/target/ppc/translate/fp-impl.c.inc
@@ -1335,6 +1335,16 @@ static bool do_lsfp_D(DisasContext *ctx, arg_D *a, bool
update, bool store,
single);
}
+static bool do_lsfp_PLS_D(DisasContext *ctx, arg_PLS_D *a, bool update,
+ bool store, bool single)
+{
+ arg_D d;
+ if (!resolve_PLS_D(ctx, &d, a)) {
+ return true;
+ }
+ return do_lsfp_D(ctx, &d, update, store, single);
+}
+
static bool do_lsfp_X(DisasContext *ctx, arg_X *a, bool update,
bool store, bool single)
{
@@ -1345,21 +1355,25 @@ TRANS(LFS, do_lsfp_D, false, false, true)
TRANS(LFSU, do_lsfp_D, true, false, true)
TRANS(LFSX, do_lsfp_X, false, false, true)
TRANS(LFSUX, do_lsfp_X, true, false, true)
+TRANS(PLFS, do_lsfp_PLS_D, false, false, true)
TRANS(LFD, do_lsfp_D, false, false, false)
TRANS(LFDU, do_lsfp_D, true, false, false)
TRANS(LFDX, do_lsfp_X, false, false, false)
TRANS(LFDUX, do_lsfp_X, true, false, false)
+TRANS(PLFD, do_lsfp_PLS_D, false, false, false)
TRANS(STFS, do_lsfp_D, false, true, true)
TRANS(STFSU, do_lsfp_D, true, true, true)
TRANS(STFSX, do_lsfp_X, false, true, true)
TRANS(STFSUX, do_lsfp_X, true, true, true)
+TRANS(PSTFS, do_lsfp_PLS_D, false, true, true)
TRANS(STFD, do_lsfp_D, false, true, false)
TRANS(STFDU, do_lsfp_D, true, true, false)
TRANS(STFDX, do_lsfp_X, false, true, false)
TRANS(STFDUX, do_lsfp_X, true, true, false)
+TRANS(PSTFD, do_lsfp_PLS_D, false, true, false)
#undef _GEN_FLOAT_ACB
#undef GEN_FLOAT_ACB
--
2.25.1
- [PATCH 00/33] PowerISA v3.1 instruction batch, matheus . ferst, 2021/10/21
- [PATCH 01/33] target/ppc: introduce do_ea_calc, matheus . ferst, 2021/10/21
- [PATCH 02/33] target/ppc: move resolve_PLS_D to translate.c, matheus . ferst, 2021/10/21
- [PATCH 03/33] target/ppc: Move load and store floating point instructions to decodetree, matheus . ferst, 2021/10/21
- [PATCH 04/33] target/ppc: Implement PLFS, PLFD, PSTFS and PSTFD instructions,
matheus . ferst <=
- [PATCH 05/33] target/ppc: Move LQ and STQ to decodetree, matheus . ferst, 2021/10/21
- [PATCH 06/33] target/ppc: Implement PLQ and PSTQ, matheus . ferst, 2021/10/21
- [PATCH 07/33] target/ppc: Implement cntlzdm, matheus . ferst, 2021/10/21
- [PATCH 08/33] target/ppc: Implement cnttzdm, matheus . ferst, 2021/10/21