Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ckb-vm-test-suite/ckb-vm-arch-test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $(info RISCV_DEVICE: ${RISCV_DEVICE} [origin: $(origin RISCV_DEVICE)])
$(info =============================================================================)
$(info )

RVTEST_DEFINES =
RVTEST_DEFINES = -DTEST_CASE_1
ifeq ($(RISCV_ASSERT),1)
RVTEST_DEFINES += -DRVMODEL_ASSERT
endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RISCV_GCC_OPTS ?= -static -mcmodel=medany -fvisibility=hidden -nostdlib -DXLEN=$


COMPILE_TARGET=\
$$(RISCV_GCC) $(2) $$(RISCV_GCC_OPTS) \
$$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \
-I$(TARGETDIR)/$(RISCV_TARGET)/ \
-I$(ROOTDIR)/../riscv-arch-test/riscv-test-suite/env/ \
-T$(TARGETDIR)/$(RISCV_TARGET)/link.ld $$< \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@
//-----------------------------------------------------------------------

#define RVMODEL_IO_WRITE_STR(_SP, _STR)

#ifdef DISABLE_GPR_EQ
// TODO https://github.com/riscv-non-isa/riscv-arch-test/issues/540
#define RVMODEL_IO_ASSERT_GPR_EQ(_SP, _R, _I)
#else
#define RVMODEL_IO_ASSERT_GPR_EQ(_SP, _R, _I) \
li _SP, _I; \
beq _R, _SP, 20002f; \
li TESTNUM, 100; \
RVTEST_FAIL; \
20002:
#endif

//-----------------------------------------------------------------------
// RV Compliance Macros
Expand Down Expand Up @@ -47,4 +53,20 @@
#define RVMODEL_CLEAR_MTIMER_INT
#define RVMODEL_CLEAR_MEXT_INT

//-----------------------------------------------------------------------
// Pass/Fail macros expected by arch tests
//-----------------------------------------------------------------------

#define TESTNUM gp

#define RVTEST_PASS \
li a0, 0; \
li a7, 93; \
ecall;

#define RVTEST_FAIL \
li a7, 93; \
addi a0, TESTNUM, 0; \
ecall;

#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include ../../Makefile.include

$(eval $(call compile_template,-march=rv64im -mabi=lp64 -DXLEN=$(XLEN)))
$(eval $(call compile_template,-march=rv64imac_zba_zbb_zbc_zbs -mabi=lp64 -DXLEN=$(XLEN) -DDISABLE_GPR_EQ))
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ rv64im_sc_tests = \
sh3add.uw-01 \
slli.uw-01 \
xnor-01 \
zext.h_64-01 \
zext.h-01
zext.h_64-01

rv64im_tests = $(addsuffix .elf, $(rv64im_sc_tests))

Expand Down
2 changes: 1 addition & 1 deletion deps/riscv-arch-test