[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 37/41] target/sparc: Implement FPMIN, FPMAX
From: |
Richard Henderson |
Subject: |
[PATCH 37/41] target/sparc: Implement FPMIN, FPMAX |
Date: |
Fri, 1 Mar 2024 19:15:57 -1000 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/sparc/translate.c | 14 ++++++++++++++
target/sparc/insns.decode | 14 ++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/target/sparc/translate.c b/target/sparc/translate.c
index 5f1982cecc..8eda190233 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -5053,6 +5053,20 @@ TRANS(FSRL32, VIS3, do_gvec_ddd, a, MO_32,
tcg_gen_gvec_shrv)
TRANS(FSRA16, VIS3, do_gvec_ddd, a, MO_16, tcg_gen_gvec_sarv)
TRANS(FSRA32, VIS3, do_gvec_ddd, a, MO_32, tcg_gen_gvec_sarv)
+TRANS(FPMIN8, VIS4, do_gvec_ddd, a, MO_8, tcg_gen_gvec_smin)
+TRANS(FPMIN16, VIS4, do_gvec_ddd, a, MO_16, tcg_gen_gvec_smin)
+TRANS(FPMIN32, VIS4, do_gvec_ddd, a, MO_32, tcg_gen_gvec_smin)
+TRANS(FPMINU8, VIS4, do_gvec_ddd, a, MO_8, tcg_gen_gvec_umin)
+TRANS(FPMINU16, VIS4, do_gvec_ddd, a, MO_16, tcg_gen_gvec_umin)
+TRANS(FPMINU32, VIS4, do_gvec_ddd, a, MO_32, tcg_gen_gvec_umin)
+
+TRANS(FPMAX8, VIS4, do_gvec_ddd, a, MO_8, tcg_gen_gvec_smax)
+TRANS(FPMAX16, VIS4, do_gvec_ddd, a, MO_16, tcg_gen_gvec_smax)
+TRANS(FPMAX32, VIS4, do_gvec_ddd, a, MO_32, tcg_gen_gvec_smax)
+TRANS(FPMAXU8, VIS4, do_gvec_ddd, a, MO_8, tcg_gen_gvec_umax)
+TRANS(FPMAXU16, VIS4, do_gvec_ddd, a, MO_16, tcg_gen_gvec_umax)
+TRANS(FPMAXU32, VIS4, do_gvec_ddd, a, MO_32, tcg_gen_gvec_umax)
+
static bool do_ddd(DisasContext *dc, arg_r_r_r *a,
void (*func)(TCGv_i64, TCGv_i64, TCGv_i64))
{
diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode
index 3ff8708304..b7b4bfe92c 100644
--- a/target/sparc/insns.decode
+++ b/target/sparc/insns.decode
@@ -524,6 +524,20 @@ FCMPEq 10 000 cc:2 110101 ..... 0 0101 0111 .....
\
FPSUBUS8 10 ..... 110110 ..... 1 0101 0111 ..... @d_d_d
FPSUBUS16 10 ..... 110110 ..... 1 0101 0011 ..... @d_d_d
+ FPMIN8 10 ..... 110110 ..... 1 0001 1010 ..... @d_d_d
+ FPMIN16 10 ..... 110110 ..... 1 0001 1011 ..... @d_d_d
+ FPMIN32 10 ..... 110110 ..... 1 0001 1100 ..... @d_d_d
+ FPMINU8 10 ..... 110110 ..... 1 0101 1010 ..... @d_d_d
+ FPMINU16 10 ..... 110110 ..... 1 0101 1011 ..... @d_d_d
+ FPMINU32 10 ..... 110110 ..... 1 0101 1100 ..... @d_d_d
+
+ FPMAX8 10 ..... 110110 ..... 1 0001 1101 ..... @d_d_d
+ FPMAX16 10 ..... 110110 ..... 1 0001 1110 ..... @d_d_d
+ FPMAX32 10 ..... 110110 ..... 1 0001 1111 ..... @d_d_d
+ FPMAXU8 10 ..... 110110 ..... 1 0101 1101 ..... @d_d_d
+ FPMAXU16 10 ..... 110110 ..... 1 0101 1110 ..... @d_d_d
+ FPMAXU32 10 ..... 110110 ..... 1 0101 1111 ..... @d_d_d
+
FLCMPs 10 000 cc:2 110110 rs1:5 1 0101 0001 rs2:5
FLCMPd 10 000 cc:2 110110 ..... 1 0101 0010 ..... \
rs1=%dfp_rs1 rs2=%dfp_rs2
--
2.34.1
- [PATCH 26/41] target/sparc: Implement LZCNT, (continued)
- [PATCH 26/41] target/sparc: Implement LZCNT, Richard Henderson, 2024/03/02
- [PATCH 27/41] target/sparc: Implement MOVsTOw, MOVdTOx, MOVwTOs, MOVxTOd, Richard Henderson, 2024/03/02
- [PATCH 28/41] target/sparc: Implement PDISTN, Richard Henderson, 2024/03/02
- [PATCH 29/41] target/sparc: Implement UMULXHI, Richard Henderson, 2024/03/02
- [PATCH 31/41] target/sparc: Enable VIS3 feature bit, Richard Henderson, 2024/03/02
- [PATCH 30/41] target/sparc: Implement XMULX, Richard Henderson, 2024/03/02
- [PATCH 33/41] target/sparc: Add feature bit for VIS4, Richard Henderson, 2024/03/02
- [PATCH 35/41] target/sparc: Implement 8-bit FPADD, FPADDS, and FPADDUS, Richard Henderson, 2024/03/02
- [PATCH 36/41] target/sparc: Implement VIS4 comparisons, Richard Henderson, 2024/03/02
- [PATCH 34/41] target/sparc: Implement FALIGNDATAi, Richard Henderson, 2024/03/02
- [PATCH 37/41] target/sparc: Implement FPMIN, FPMAX,
Richard Henderson <=
- [PATCH 38/41] target/sparc: Implement SUBXC, SUBXCcc, Richard Henderson, 2024/03/02
- [PATCH 39/41] target/sparc: Implement MWAIT, Richard Henderson, 2024/03/02
- [PATCH 32/41] target/sparc: Implement IMA extension, Richard Henderson, 2024/03/02
- [PATCH 40/41] target/sparc: Implement monitor asis, Richard Henderson, 2024/03/02
- [PATCH 41/41] target/sparc: Enable VIS4 feature bit, Richard Henderson, 2024/03/02
- Re: [PATCH 00/41] target/sparc: Implement VIS4, Mark Cave-Ayland, 2024/03/05