aboutsummaryrefslogtreecommitdiff
path: root/isa/rv64ui/ori.S
diff options
context:
space:
mode:
authorYunsup Lee <yunsup@cs.berkeley.edu>2013-04-22 14:56:59 -0700
committerYunsup Lee <yunsup@cs.berkeley.edu>2013-04-22 14:56:59 -0700
commit81ad66f25ce4c15180e558696961bd8eaf967fea (patch)
treed70676fb1d11a4a66a268f7860d3ef7d469987fe /isa/rv64ui/ori.S
downloadriscv-tests-81ad66f25ce4c15180e558696961bd8eaf967fea.zip
riscv-tests-81ad66f25ce4c15180e558696961bd8eaf967fea.tar.gz
riscv-tests-81ad66f25ce4c15180e558696961bd8eaf967fea.tar.bz2
initial commit
Diffstat (limited to 'isa/rv64ui/ori.S')
-rw-r--r--isa/rv64ui/ori.S53
1 files changed, 53 insertions, 0 deletions
diff --git a/isa/rv64ui/ori.S b/isa/rv64ui/ori.S
new file mode 100644
index 0000000..5f6c018
--- /dev/null
+++ b/isa/rv64ui/ori.S
@@ -0,0 +1,53 @@
+#*****************************************************************************
+# ori.S
+#-----------------------------------------------------------------------------
+#
+# Test ori instruction.
+#
+
+#include "riscv_test.h"
+#include "test_macros.h"
+
+RVTEST_RV64U
+RVTEST_CODE_BEGIN
+
+ #-------------------------------------------------------------
+ # Logical tests
+ #-------------------------------------------------------------
+
+ TEST_IMM_OP( 2, ori, 0xffffffffffffff0f, 0xffffffffff00ff00, 0xf0f );
+ TEST_IMM_OP( 3, ori, 0x000000000ff00ff0, 0x000000000ff00ff0, 0x0f0 );
+ TEST_IMM_OP( 4, ori, 0x0000000000ff07ff, 0x0000000000ff00ff, 0x70f );
+ TEST_IMM_OP( 5, ori, 0xfffffffff00ff0ff, 0xfffffffff00ff00f, 0x0f0 );
+
+ #-------------------------------------------------------------
+ # Source/Destination tests
+ #-------------------------------------------------------------
+
+ TEST_IMM_SRC1_EQ_DEST( 6, ori, 0xff00fff0, 0xff00ff00, 0x0f0 );
+
+ #-------------------------------------------------------------
+ # Bypassing tests
+ #-------------------------------------------------------------
+
+ TEST_IMM_DEST_BYPASS( 7, 0, ori, 0x000000000ff00ff0, 0x000000000ff00ff0, 0x0f0 );
+ TEST_IMM_DEST_BYPASS( 8, 1, ori, 0x0000000000ff07ff, 0x0000000000ff00ff, 0x70f );
+ TEST_IMM_DEST_BYPASS( 9, 2, ori, 0xfffffffff00ff0ff, 0xfffffffff00ff00f, 0x0f0 );
+
+ TEST_IMM_SRC1_BYPASS( 10, 0, ori, 0x000000000ff00ff0, 0x000000000ff00ff0, 0x0f0 );
+ TEST_IMM_SRC1_BYPASS( 11, 1, ori, 0xffffffffffffffff, 0x0000000000ff00ff, 0xf0f );
+ TEST_IMM_SRC1_BYPASS( 12, 2, ori, 0xfffffffff00ff0ff, 0xfffffffff00ff00f, 0x0f0 );
+
+ TEST_IMM_ZEROSRC1( 13, ori, 0x0f0, 0x0f0 );
+ TEST_IMM_ZERODEST( 14, ori, 0x00ff00ff, 0x70f );
+
+ TEST_PASSFAIL
+
+RVTEST_CODE_END
+
+ .data
+RVTEST_DATA_BEGIN
+
+ TEST_DATA
+
+RVTEST_DATA_END