@@ -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
@@ -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; \
new file mode 100644
@@ -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
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