aboutsummaryrefslogtreecommitdiff
path: root/isa/rv32ui/jal.S
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2016-07-11 17:41:59 -0700
committerAndrew Waterman <waterman@cs.berkeley.edu>2016-07-11 17:41:59 -0700
commita5b7f805c111e14a1478153147a57283a0b9e45d (patch)
tree5da82ce6cae37a6f685996b3e36ecd6401d82fb0 /isa/rv32ui/jal.S
parent3dc00e7b04834f862a074ac8822892e1ecfc009c (diff)
downloadriscv-tests-a5b7f805c111e14a1478153147a57283a0b9e45d.zip
riscv-tests-a5b7f805c111e14a1478153147a57283a0b9e45d.tar.gz
riscv-tests-a5b7f805c111e14a1478153147a57283a0b9e45d.tar.bz2
Remove vestigial j instruction test; improve jal test
Diffstat (limited to 'isa/rv32ui/jal.S')
-rw-r--r--isa/rv32ui/jal.S59
1 files changed, 3 insertions, 56 deletions
diff --git a/isa/rv32ui/jal.S b/isa/rv32ui/jal.S
index 742abac..93f407b 100644
--- a/isa/rv32ui/jal.S
+++ b/isa/rv32ui/jal.S
@@ -1,60 +1,7 @@
# See LICENSE for license details.
-#*****************************************************************************
-# jal.S
-#-----------------------------------------------------------------------------
-#
-# Test jal instruction.
-#
-
#include "riscv_test.h"
-#include "test_macros.h"
-
-RVTEST_RV32U
-RVTEST_CODE_BEGIN
-
- #-------------------------------------------------------------
- # Test 2: Basic test
- #-------------------------------------------------------------
-
-test_2:
- li TESTNUM, 2
- li ra, 0
-
-linkaddr_2:
- jal target_2
- nop
- nop
-
- j fail
-
-target_2:
- la x2, linkaddr_2
- addi x2, x2, 4
- bne x2, ra, fail
-
- #-------------------------------------------------------------
- # Test delay slot instructions not executed nor bypassed
- #-------------------------------------------------------------
-
- TEST_CASE( 3, x2, 3, \
- li x2, 1; \
- jal 1f; \
- addi x2, x2, 1; \
- addi x2, x2, 1; \
- addi x2, x2, 1; \
- addi x2, x2, 1; \
-1: addi x2, x2, 1; \
- addi x2, x2, 1; \
- )
-
- TEST_PASSFAIL
-
-RVTEST_CODE_END
-
- .data
-RVTEST_DATA_BEGIN
-
- TEST_DATA
+#undef RVTEST_RV64U
+#define RVTEST_RV64U RVTEST_RV32U
-RVTEST_DATA_END
+#include "../rv64ui/jal.S"