aboutsummaryrefslogtreecommitdiff
path: root/isa/rv32ui/xori.S
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2016-08-30 13:02:59 -0700
committerAndrew Waterman <waterman@cs.berkeley.edu>2016-08-30 13:13:52 -0700
commit8c633e9e80d0b3e3764ebc3651e9cc09ab9413c9 (patch)
treefc8b6f6c7a2231e52e095c7a1cb682fd18f79235 /isa/rv32ui/xori.S
parent2a9cd2c6cc19863c781bcaa8b276de6e528fba8e (diff)
downloadriscv-tests-8c633e9e80d0b3e3764ebc3651e9cc09ab9413c9.zip
riscv-tests-8c633e9e80d0b3e3764ebc3651e9cc09ab9413c9.tar.gz
riscv-tests-8c633e9e80d0b3e3764ebc3651e9cc09ab9413c9.tar.bz2
Share code between rv32ui and rv64ui tests
They were almost identical, so I made them actually identical. This will reduce the burden of writing further tests that span base ISAs. Tests can still be specialized for XLEN with ifdefs on e.g. __riscv64.
Diffstat (limited to 'isa/rv32ui/xori.S')
-rw-r--r--isa/rv32ui/xori.S54
1 files changed, 3 insertions, 51 deletions
diff --git a/isa/rv32ui/xori.S b/isa/rv32ui/xori.S
index 7f2207c..9e71152 100644
--- a/isa/rv32ui/xori.S
+++ b/isa/rv32ui/xori.S
@@ -1,55 +1,7 @@
# See LICENSE for license details.
-#*****************************************************************************
-# xori.S
-#-----------------------------------------------------------------------------
-#
-# Test xori instruction.
-#
-
#include "riscv_test.h"
-#include "test_macros.h"
-
-RVTEST_RV32U
-RVTEST_CODE_BEGIN
-
- #-------------------------------------------------------------
- # Logical tests
- #-------------------------------------------------------------
-
- TEST_IMM_OP( 2, xori, 0xff00f00f, 0x00ff0f00, 0xf0f );
- TEST_IMM_OP( 3, xori, 0x0ff00f00, 0x0ff00ff0, 0x0f0 );
- TEST_IMM_OP( 4, xori, 0x00ff0ff0, 0x00ff08ff, 0x70f );
- TEST_IMM_OP( 5, xori, 0xf00ff0ff, 0xf00ff00f, 0x0f0 );
-
- #-------------------------------------------------------------
- # Source/Destination tests
- #-------------------------------------------------------------
-
- TEST_IMM_SRC1_EQ_DEST( 6, xori, 0xff00f00f, 0xff00f700, 0x70f );
-
- #-------------------------------------------------------------
- # Bypassing tests
- #-------------------------------------------------------------
-
- TEST_IMM_DEST_BYPASS( 7, 0, xori, 0x0ff00f00, 0x0ff00ff0, 0x0f0 );
- TEST_IMM_DEST_BYPASS( 8, 1, xori, 0x00ff0ff0, 0x00ff08ff, 0x70f );
- TEST_IMM_DEST_BYPASS( 9, 2, xori, 0xf00ff0ff, 0xf00ff00f, 0x0f0 );
-
- TEST_IMM_SRC1_BYPASS( 10, 0, xori, 0x0ff00f00, 0x0ff00ff0, 0x0f0 );
- TEST_IMM_SRC1_BYPASS( 11, 1, xori, 0x00ff0ff0, 0x00ff0fff, 0x00f );
- TEST_IMM_SRC1_BYPASS( 12, 2, xori, 0xf00ff0ff, 0xf00ff00f, 0x0f0 );
-
- TEST_IMM_ZEROSRC1( 13, xori, 0x0f0, 0x0f0 );
- TEST_IMM_ZERODEST( 14, xori, 0x00ff00ff, 0x70f );
-
- TEST_PASSFAIL
-
-RVTEST_CODE_END
-
- .data
-RVTEST_DATA_BEGIN
-
- TEST_DATA
+#undef RVTEST_RV64U
+#define RVTEST_RV64U RVTEST_RV32U
-RVTEST_DATA_END
+#include "../rv64ui/xori.S"