[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/12] tests/tcg/tricore: Add test for OPC2_32_RCRW_IMASK
From: |
Bastian Koppelmann |
Subject: |
[PULL 02/12] tests/tcg/tricore: Add test for OPC2_32_RCRW_IMASK |
Date: |
Wed, 8 Feb 2023 10:14:12 +0100 |
Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Message-Id: <20230202120432.1268-3-kbastian@mail.uni-paderborn.de>
Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
---
tests/tcg/tricore/Makefile.softmmu-target | 1 +
tests/tcg/tricore/macros.h | 7 +++++++
tests/tcg/tricore/test_imask.S | 10 ++++++++++
3 files changed, 18 insertions(+)
create mode 100644 tests/tcg/tricore/test_imask.S
diff --git a/tests/tcg/tricore/Makefile.softmmu-target
b/tests/tcg/tricore/Makefile.softmmu-target
index 5007c60ce8..bc0cfae8d0 100644
--- a/tests/tcg/tricore/Makefile.softmmu-target
+++ b/tests/tcg/tricore/Makefile.softmmu-target
@@ -10,6 +10,7 @@ TESTS += test_dvstep.tst
TESTS += test_fadd.tst
TESTS += test_fmul.tst
TESTS += test_ftoi.tst
+TESTS += test_imask.tst
TESTS += test_madd.tst
TESTS += test_msub.tst
TESTS += test_muls.tst
diff --git a/tests/tcg/tricore/macros.h b/tests/tcg/tricore/macros.h
index 0d76fc403a..ceb7e9c0b7 100644
--- a/tests/tcg/tricore/macros.h
+++ b/tests/tcg/tricore/macros.h
@@ -111,6 +111,13 @@ test_ ## num:
\
insn EREG_CALC_RESULT, EREG_RS1, DREG_RS2; \
)
+#define TEST_E_IDI(insn, num, res_hi, res_lo, imm1, rs1, imm2) \
+ TEST_CASE_E(num, res_lo, res_hi, \
+ LI(DREG_RS1, rs1); \
+ rstv; \
+ insn EREG_CALC_RESULT, imm1, DREG_RS1, imm2); \
+ )
+
/* Pass/Fail handling part */
#define TEST_PASSFAIL \
j pass; \
diff --git a/tests/tcg/tricore/test_imask.S b/tests/tcg/tricore/test_imask.S
new file mode 100644
index 0000000000..356cf398b8
--- /dev/null
+++ b/tests/tcg/tricore/test_imask.S
@@ -0,0 +1,10 @@
+#include "macros.h"
+.text
+.global _start
+_start:
+# res[31:0]
+# insn num res[63:32] | imm1 rs1 imm2
+# | | | | | | |
+ TEST_E_IDI(imask, 1, 0x000f0000, 0x00050000, 0x5, 0x10, 0x4)
+
+ TEST_PASSFAIL
--
2.39.1
- [PULL 00/12] tricore queue, Bastian Koppelmann, 2023/02/08
- [PULL 01/12] target/tricore: Fix OPC2_32_RCRW_IMASK translation, Bastian Koppelmann, 2023/02/08
- [PULL 02/12] tests/tcg/tricore: Add test for OPC2_32_RCRW_IMASK,
Bastian Koppelmann <=
- [PULL 04/12] tests/tcg/tricore: Add test for OPC2_32_RCRW_INSERT, Bastian Koppelmann, 2023/02/08
- [PULL 03/12] target/tricore: Fix OPC2_32_RCRW_INSERT translation, Bastian Koppelmann, 2023/02/08
- [PULL 05/12] target/tricore: Fix RRPW_DEXTR, Bastian Koppelmann, 2023/02/08
- [PULL 06/12] tests/tcg/tricore: Add tests for RRPW_DEXTR, Bastian Koppelmann, 2023/02/08
- [PULL 07/12] target/tricore: Fix OPC2_32_RRRR_DEXTR, Bastian Koppelmann, 2023/02/08
- [PULL 08/12] tests/tcg/tricore: Add OPC2_32_RRRR_DEXTR tests, Bastian Koppelmann, 2023/02/08
- [PULL 10/12] tests/tcg/tricore: Add LD.BU tests, Bastian Koppelmann, 2023/02/08
- [PULL 09/12] target/tricore: Fix OPC2_32_BO_LD_BU_PREINC, Bastian Koppelmann, 2023/02/08
- [PULL 11/12] target/tricore: Fix OPC1_16_SRO_LD_H translation, Bastian Koppelmann, 2023/02/08
- [PULL 12/12] tests/tcg/tricore: Add test for ld.h, Bastian Koppelmann, 2023/02/08