[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 11/37] target/sparc: Implement ADDXC, ADDXCcc
From: |
Richard Henderson |
Subject: |
[PATCH v2 11/37] target/sparc: Implement ADDXC, ADDXCcc |
Date: |
Sun, 26 May 2024 12:42:28 -0700 |
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/sparc/insns.decode | 3 +++
target/sparc/translate.c | 14 ++++++++++++++
2 files changed, 17 insertions(+)
diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode
index 056fba98f9..5d1c55aa78 100644
--- a/target/sparc/insns.decode
+++ b/target/sparc/insns.decode
@@ -376,6 +376,9 @@ FCMPEq 10 000 cc:2 110101 ..... 0 0101 0111 ..... \
ARRAY16 10 ..... 110110 ..... 0 0001 0010 ..... @r_r_r
ARRAY32 10 ..... 110110 ..... 0 0001 0100 ..... @r_r_r
+ ADDXC 10 ..... 110110 ..... 0 0001 0001 ..... @r_r_r
+ ADDXCcc 10 ..... 110110 ..... 0 0001 0011 ..... @r_r_r
+
ALIGNADDR 10 ..... 110110 ..... 0 0001 1000 ..... @r_r_r
ALIGNADDRL 10 ..... 110110 ..... 0 0001 1010 ..... @r_r_r
diff --git a/target/sparc/translate.c b/target/sparc/translate.c
index 9e5fe905ad..40e245abdd 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -433,6 +433,17 @@ static void gen_op_addccc(TCGv dst, TCGv src1, TCGv src2)
gen_op_addcc_int(dst, src1, src2, gen_carry32());
}
+static void gen_op_addxc(TCGv dst, TCGv src1, TCGv src2)
+{
+ tcg_gen_add_tl(dst, src1, src2);
+ tcg_gen_add_tl(dst, dst, cpu_cc_C);
+}
+
+static void gen_op_addxccc(TCGv dst, TCGv src1, TCGv src2)
+{
+ gen_op_addcc_int(dst, src1, src2, cpu_cc_C);
+}
+
static void gen_op_subcc_int(TCGv dst, TCGv src1, TCGv src2, TCGv cin)
{
TCGv z = tcg_constant_tl(0);
@@ -3692,6 +3703,9 @@ TRANS(ARRAY8, VIS1, do_rrr, a, gen_helper_array8)
TRANS(ARRAY16, VIS1, do_rrr, a, gen_op_array16)
TRANS(ARRAY32, VIS1, do_rrr, a, gen_op_array32)
+TRANS(ADDXC, VIS3, do_rrr, a, gen_op_addxc)
+TRANS(ADDXCcc, VIS3, do_rrr, a, gen_op_addxccc)
+
static void gen_op_alignaddr(TCGv dst, TCGv s1, TCGv s2)
{
#ifdef TARGET_SPARC64
--
2.34.1
- [PATCH v2 00/37] target/sparc: Implement VIS4, Richard Henderson, 2024/05/26
- [PATCH v2 01/37] target/sparc: Fix ARRAY8, Richard Henderson, 2024/05/26
- [PATCH v2 02/37] target/sparc: Rewrite gen_edge, Richard Henderson, 2024/05/26
- [PATCH v2 03/37] target/sparc: Fix do_dc, Richard Henderson, 2024/05/26
- [PATCH v2 04/37] target/sparc: Fix helper_fmul8ulx16, Richard Henderson, 2024/05/26
- [PATCH v2 06/37] target/sparc: Remove gen_dest_fpr_D, Richard Henderson, 2024/05/26
- [PATCH v2 05/37] target/sparc: Perform DFPREG/QFPREG in decodetree, Richard Henderson, 2024/05/26
- [PATCH v2 08/37] target/sparc: Use gvec for VIS1 parallel add/sub, Richard Henderson, 2024/05/26
- [PATCH v2 07/37] target/sparc: Remove cpu_fpr[], Richard Henderson, 2024/05/26
- [PATCH v2 09/37] target/sparc: Implement FMAf extension, Richard Henderson, 2024/05/26
- [PATCH v2 11/37] target/sparc: Implement ADDXC, ADDXCcc,
Richard Henderson <=
- [PATCH v2 10/37] target/sparc: Add feature bits for VIS 3, Richard Henderson, 2024/05/26
- [PATCH v2 14/37] target/sparc: Implement FHADD, FHSUB, FNHADD, FNADD, FNMUL, Richard Henderson, 2024/05/26
- [PATCH v2 15/37] target/sparc: Implement FLCMP, Richard Henderson, 2024/05/26
- [PATCH v2 16/37] target/sparc: Implement FMEAN16, Richard Henderson, 2024/05/26
- [PATCH v2 12/37] target/sparc: Implement CMASK instructions, Richard Henderson, 2024/05/26
- [PATCH v2 13/37] target/sparc: Implement FCHKSM16, Richard Henderson, 2024/05/26
- [PATCH v2 17/37] target/sparc: Implement FPADD64, FPSUB64, Richard Henderson, 2024/05/26
- [PATCH v2 19/37] target/sparc: Implement FPCMPEQ8, FPCMPNE8, FPCMPULE8, FPCMPUGT8, Richard Henderson, 2024/05/26
- [PATCH v2 22/37] target/sparc: Implement LZCNT, Richard Henderson, 2024/05/26
- [PATCH v2 18/37] target/sparc: Implement FPADDS, FPSUBS, Richard Henderson, 2024/05/26