SummerCart64/fw/picorv32/tests/j.S
Polprzewodnikowy e61d06275d whatever
2021-08-05 19:50:29 +02:00

50 lines
975 B
ArmAsm

# See LICENSE for license details.
#*****************************************************************************
# j.S
#-----------------------------------------------------------------------------
#
# Test j instruction.
#
#include "riscv_test.h"
#include "test_macros.h"
RVTEST_RV32U
RVTEST_CODE_BEGIN
#-------------------------------------------------------------
# Test basic
#-------------------------------------------------------------
li TESTNUM, 2;
j test_2;
j fail;
test_2:
#-------------------------------------------------------------
# Test delay slot instructions not executed nor bypassed
#-------------------------------------------------------------
TEST_CASE( 3, x1, 3, \
li x1, 1; \
j 1f; \
addi x1, x1, 1; \
addi x1, x1, 1; \
addi x1, x1, 1; \
addi x1, x1, 1; \
1: addi x1, x1, 1; \
addi x1, x1, 1; \
)
TEST_PASSFAIL
RVTEST_CODE_END
.data
RVTEST_DATA_BEGIN
TEST_DATA
RVTEST_DATA_END