[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 08/49] target/ppc: Implement vextsd2q
From: |
matheus . ferst |
Subject: |
[PATCH v5 08/49] target/ppc: Implement vextsd2q |
Date: |
Fri, 25 Feb 2022 18:08:55 -0300 |
From: Lucas Coutinho <lucas.coutinho@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Lucas Coutinho <lucas.coutinho@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
---
target/ppc/insn32.decode | 1 +
target/ppc/translate/vmx-impl.c.inc | 18 ++++++++++++++++++
2 files changed, 19 insertions(+)
diff --git a/target/ppc/insn32.decode b/target/ppc/insn32.decode
index 1dcf9c61e9..cba680075b 100644
--- a/target/ppc/insn32.decode
+++ b/target/ppc/insn32.decode
@@ -426,6 +426,7 @@ VEXTSH2W 000100 ..... 10001 ..... 11000000010
@VX_tb
VEXTSB2D 000100 ..... 11000 ..... 11000000010 @VX_tb
VEXTSH2D 000100 ..... 11001 ..... 11000000010 @VX_tb
VEXTSW2D 000100 ..... 11010 ..... 11000000010 @VX_tb
+VEXTSD2Q 000100 ..... 11011 ..... 11000000010 @VX_tb
## Vector Mask Manipulation Instructions
diff --git a/target/ppc/translate/vmx-impl.c.inc
b/target/ppc/translate/vmx-impl.c.inc
index aa021bdf54..afe56a19d5 100644
--- a/target/ppc/translate/vmx-impl.c.inc
+++ b/target/ppc/translate/vmx-impl.c.inc
@@ -1825,6 +1825,24 @@ TRANS(VEXTSB2D, do_vexts, MO_64, 56);
TRANS(VEXTSH2D, do_vexts, MO_64, 48);
TRANS(VEXTSW2D, do_vexts, MO_64, 32);
+static bool trans_VEXTSD2Q(DisasContext *ctx, arg_VX_tb *a)
+{
+ TCGv_i64 tmp;
+
+ REQUIRE_INSNS_FLAGS2(ctx, ISA310);
+ REQUIRE_VECTOR(ctx);
+
+ tmp = tcg_temp_new_i64();
+
+ get_avr64(tmp, a->vrb, false);
+ set_avr64(a->vrt, tmp, false);
+ tcg_gen_sari_i64(tmp, tmp, 63);
+ set_avr64(a->vrt, tmp, true);
+
+ tcg_temp_free_i64(tmp);
+ return true;
+}
+
GEN_VXFORM_NOA_2(vctzb, 1, 24, 28)
GEN_VXFORM_NOA_2(vctzh, 1, 24, 29)
GEN_VXFORM_NOA_2(vctzw, 1, 24, 30)
--
2.25.1
- [PATCH v5 00/49] target/ppc: PowerISA Vector/VSX instruction batch, matheus . ferst, 2022/02/25
- [PATCH v5 01/49] target/ppc: Introduce TRANS*FLAGS macros, matheus . ferst, 2022/02/25
- [PATCH v5 02/49] target/ppc: moved vector even and odd multiplication to decodetree, matheus . ferst, 2022/02/25
- [PATCH v5 03/49] target/ppc: Moved vector multiply high and low to decodetree, matheus . ferst, 2022/02/25
- [PATCH v5 05/49] target/ppc: Implement vmsumcud instruction, matheus . ferst, 2022/02/25
- [PATCH v5 04/49] target/ppc: vmulh* instructions without helpers, matheus . ferst, 2022/02/25
- [PATCH v5 06/49] target/ppc: Implement vmsumudm instruction, matheus . ferst, 2022/02/25
- [PATCH v5 07/49] target/ppc: Move vexts[bhw]2[wd] to decodetree, matheus . ferst, 2022/02/25
- [PATCH v5 08/49] target/ppc: Implement vextsd2q,
matheus . ferst <=
- [PATCH v5 09/49] target/ppc: Move Vector Compare Equal/Not Equal/Greater Than to decodetree, matheus . ferst, 2022/02/25
- [PATCH v5 10/49] target/ppc: Move Vector Compare Not Equal or Zero to decodetree, matheus . ferst, 2022/02/25
- [PATCH v5 12/49] target/ppc: Implement Vector Compare Greater Than Quadword, matheus . ferst, 2022/02/25
- [PATCH v5 11/49] target/ppc: Implement Vector Compare Equal Quadword, matheus . ferst, 2022/02/25
- [PATCH v5 14/49] target/ppc: implement vstri[bh][lr], matheus . ferst, 2022/02/25
- [PATCH v5 13/49] target/ppc: Implement Vector Compare Quadword, matheus . ferst, 2022/02/25
- [PATCH v5 15/49] target/ppc: implement vclrlb, matheus . ferst, 2022/02/25
- [PATCH v5 16/49] target/ppc: implement vclrrb, matheus . ferst, 2022/02/25
- [PATCH v5 17/49] target/ppc: implement vcntmb[bhwd], matheus . ferst, 2022/02/25
- [PATCH v5 19/49] target/ppc: move vs[lr][a][bhwd] to decodetree, matheus . ferst, 2022/02/25