[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 25/36] target/arm: Convert Neon VRHADD, VHSUB, VABD 3-reg-same in
From: |
Peter Maydell |
Subject: |
[PATCH 25/36] target/arm: Convert Neon VRHADD, VHSUB, VABD 3-reg-same insns to decodetree |
Date: |
Thu, 30 Apr 2020 19:09:52 +0100 |
Convert the Neon VRHADD, VHSUB and VABD 3-reg-same insns to
decodetree. (These are all the other insns in 3-reg-same which were
using GEN_NEON_INTEGER_OP() and which are not pairwise or
reversed-operands.)
Signed-off-by: Peter Maydell <address@hidden>
---
target/arm/translate-neon.inc.c | 3 +++
target/arm/translate.c | 12 +++---------
target/arm/neon-dp.decode | 9 +++++++++
3 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/target/arm/translate-neon.inc.c b/target/arm/translate-neon.inc.c
index 7a602d76566..bdd5f33214e 100644
--- a/target/arm/translate-neon.inc.c
+++ b/target/arm/translate-neon.inc.c
@@ -1032,3 +1032,6 @@ static bool do_3same_32(DisasContext *s, arg_3same *a,
NeonGenTwoOpFn *fn)
}
DO_3SAME_32(VHADD, hadd)
+DO_3SAME_32(VHSUB, hsub)
+DO_3SAME_32(VRHADD, rhadd)
+DO_3SAME_32(VABD, abd)
diff --git a/target/arm/translate.c b/target/arm/translate.c
index 67616fc218a..29301061ca5 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -4787,6 +4787,9 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t
insn)
case NEON_3R_VSHL:
case NEON_3R_SHA:
case NEON_3R_VHADD:
+ case NEON_3R_VRHADD:
+ case NEON_3R_VHSUB:
+ case NEON_3R_VABD:
/* Already handled by decodetree */
return 1;
}
@@ -4867,12 +4870,6 @@ static int disas_neon_data_insn(DisasContext *s,
uint32_t insn)
tmp2 = neon_load_reg(rm, pass);
}
switch (op) {
- case NEON_3R_VRHADD:
- GEN_NEON_INTEGER_OP(rhadd);
- break;
- case NEON_3R_VHSUB:
- GEN_NEON_INTEGER_OP(hsub);
- break;
case NEON_3R_VQSHL:
GEN_NEON_INTEGER_OP_ENV(qshl);
break;
@@ -4882,9 +4879,6 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t
insn)
case NEON_3R_VQRSHL:
GEN_NEON_INTEGER_OP_ENV(qrshl);
break;
- case NEON_3R_VABD:
- GEN_NEON_INTEGER_OP(abd);
- break;
case NEON_3R_VABA:
GEN_NEON_INTEGER_OP(abd);
tcg_temp_free_i32(tmp2);
diff --git a/target/arm/neon-dp.decode b/target/arm/neon-dp.decode
index 055004df4e8..4b15e52221b 100644
--- a/target/arm/neon-dp.decode
+++ b/target/arm/neon-dp.decode
@@ -47,6 +47,9 @@ VHADD_U_3s 1111 001 1 0 . .. .... .... 0000 . . . 0
.... @3same
VQADD_S_3s 1111 001 0 0 . .. .... .... 0000 . . . 1 .... @3same
VQADD_U_3s 1111 001 1 0 . .. .... .... 0000 . . . 1 .... @3same
+VRHADD_S_3s 1111 001 0 0 . .. .... .... 0001 . . . 0 .... @3same
+VRHADD_U_3s 1111 001 1 0 . .. .... .... 0001 . . . 0 .... @3same
+
@3same_logic .... ... . . . .. .... .... .... . q:1 .. .... \
&3same vm=%vm_dp vn=%vn_dp vd=%vd_dp size=0
@@ -59,6 +62,9 @@ VBSL_3s 1111 001 1 0 . 01 .... .... 0001 ... 1 ....
@3same_logic
VBIT_3s 1111 001 1 0 . 10 .... .... 0001 ... 1 .... @3same_logic
VBIF_3s 1111 001 1 0 . 11 .... .... 0001 ... 1 .... @3same_logic
+VHSUB_S_3s 1111 001 0 0 . .. .... .... 0010 . . . 0 .... @3same
+VHSUB_U_3s 1111 001 1 0 . .. .... .... 0010 . . . 0 .... @3same
+
VQSUB_S_3s 1111 001 0 0 . .. .... .... 0010 . . . 1 .... @3same
VQSUB_U_3s 1111 001 1 0 . .. .... .... 0010 . . . 1 .... @3same
@@ -86,6 +92,9 @@ VMAX_U_3s 1111 001 1 0 . .. .... .... 0110 . . . 0
.... @3same
VMIN_S_3s 1111 001 0 0 . .. .... .... 0110 . . . 1 .... @3same
VMIN_U_3s 1111 001 1 0 . .. .... .... 0110 . . . 1 .... @3same
+VABD_S_3s 1111 001 0 0 . .. .... .... 0111 . . . 0 .... @3same
+VABD_U_3s 1111 001 1 0 . .. .... .... 0111 . . . 0 .... @3same
+
VADD_3s 1111 001 0 0 . .. .... .... 1000 . . . 0 .... @3same
VSUB_3s 1111 001 1 0 . .. .... .... 1000 . . . 0 .... @3same
--
2.20.1
- Re: [PATCH 18/36] target/arm: Convert Neon 3-reg-same VQADD/VQSUB to decodetree, (continued)
- [PATCH 20/36] target/arm: Convert Neon 3-reg-same VQRDMLAH/VQRDMLSH to decodetree, Peter Maydell, 2020/04/30
- [PATCH 19/36] target/arm: Convert Neon 3-reg-same VMUL, VMLA, VMLS, VSHL to decodetree, Peter Maydell, 2020/04/30
- [PATCH 22/36] target/arm: Move gen_ function typedefs to translate.h, Peter Maydell, 2020/04/30
- [PATCH 23/36] target/arm: Convert Neon 64-bit element 3-reg-same insns, Peter Maydell, 2020/04/30
- [PATCH 25/36] target/arm: Convert Neon VRHADD, VHSUB, VABD 3-reg-same insns to decodetree,
Peter Maydell <=
- [PATCH 21/36] target/arm: Convert Neon 3-reg-same SHA to decodetree, Peter Maydell, 2020/04/30
- [PATCH 24/36] target/arm: Convert Neon VHADD 3-reg-same insns, Peter Maydell, 2020/04/30
- [PATCH 26/36] target/arm: Convert Neon VQSHL, VRSHL, VQRSHL 3-reg-same insns to decodetree, Peter Maydell, 2020/04/30
- [PATCH 27/36] target/arm: Convert Neon VABA 3-reg-same to decodetree, Peter Maydell, 2020/04/30
- [PATCH 29/36] target/arm: Convert Neon VPADD 3-reg-same insns to decodetree, Peter Maydell, 2020/04/30