--- /dev/null
+#=======================================================================
+# Makefile for riscv-tests/isa
+#-----------------------------------------------------------------------
+
+include rv64ui/Makefrag
+include rv64uf/Makefrag
+include rv64uv/Makefrag
+include rv64si/Makefrag
+include rv64sv/Makefrag
+
+default: all
+
+#--------------------------------------------------------------------
+# Build rules
+#--------------------------------------------------------------------
+
+RISCV_GCC = riscv-gcc
+RISCV_GCC_OPTS = -nostdlib -nostartfiles
+RISCV_OBJDUMP = riscv-objdump --disassemble-all --disassemble-zeroes --section=.text --section=.data --section=.bss
+RISCV_SIM = riscv-isa-run
+
+#------------------------------------------------------------
+# Build assembly tests
+
+%.hex: %
+ elf2hex 16 16384 $< > $@
+
+%.dump: %
+ $(RISCV_OBJDUMP) $< > $@
+
+%.out: %
+ $(RISCV_SIM) $< 2> $@
+
+define compile_template
+
+$$($(1)_p_tests): $(1)-p-%: $(1)/%.S
+ $$(RISCV_GCC) $$(RISCV_GCC_OPTS) -I../env/p -I./macros/scalar -T../env/p/link.ld $$< -o $$@
+tests += $$($(1)_p_tests)
+
+$$($(1)_pt_tests): $(1)-pt-%: $(1)/%.S
+ $$(RISCV_GCC) $$(RISCV_GCC_OPTS) -I../env/pt -I./macros/scalar -T../env/p/link.ld $$< -o $$@
+tests += $$($(1)_pt_tests)
+
+$$($(1)_pm_tests): $(1)-pm-%: $(1)/%.S
+ $$(RISCV_GCC) $$(RISCV_GCC_OPTS) -I../env/pm -I./macros/scalar -T../env/pm/link.ld $$< -o $$@
+tests += $$($(1)_pm_tests)
+
+$$($(1)_v_tests): $(1)-v-%: $(1)/%.S
+ $$(RISCV_GCC) $$(RISCV_GCC_OPTS) -std=gnu99 -O2 -I../env/v -I./macros/scalar -T../env/v/link.ld ../env/v/entry.S ../env/v/vm.c $$< -lc -o $$@
+tests += $$($(1)_v_tests)
+
+$$($(1)_p_vec_tests): $(1)-p-vec-%: $(1)/%.S
+ $$(RISCV_GCC) $$(RISCV_GCC_OPTS) -I../env/p -I./macros/vector -T../env/p/link.ld $$< -o $$@
+tests += $$($(1)_p_vec_tests)
+
+$$($(1)_pt_vec_tests): $(1)-pt-vec-%: $(1)/%.S
+ $$(RISCV_GCC) $$(RISCV_GCC_OPTS) -I../env/pt -I./macros/vector -T../env/pt/link.ld $$< -o $$@
+tests += $$($(1)_pt_vec_tests)
+
+$$($(1)_v_vec_tests): $(1)-v-vec-%: $(1)/%.S
+ $$(RISCV_GCC) $$(RISCV_GCC_OPTS) -std=gnu99 -O2 -I../env/v -I./macros/vector -T../env/v/link.ld ../env/v/entry.S ../env/v/vm.c $$< -lc -o $$@
+tests += $$($(1)_v_vec_tests)
+
+endef
+
+$(eval $(call compile_template,rv64ui))
+$(eval $(call compile_template,rv64uf))
+$(eval $(call compile_template,rv64uv))
+$(eval $(call compile_template,rv64si))
+$(eval $(call compile_template,rv64sv))
+
+tests_dump = $(addsuffix .dump, $(tests))
+tests_hex = $(addsuffix .hex, $(tests))
+tests_out = $(addsuffix .out, $(spike_tests))
+
+run: $(tests_out)
+ echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' \
+ $(tests_out); echo;
+
+junk += $(tests) $(tests_dump) $(tests_hex) $(tests_out)
+
+#------------------------------------------------------------
+# Default
+
+all: $(tests_dump) $(tests_hex)
+
+#------------------------------------------------------------
+# Clean up
+
+clean:
+ rm -rf $(junk)
+++ /dev/null
-#=======================================================================
-# Makefile for riscv-tests
-#-----------------------------------------------------------------------
-
-default: all
-
-#--------------------------------------------------------------------
-# Sources
-#--------------------------------------------------------------------
-
-rv64si_sc_tests = \
- coreid \
-
-rv64si_mc_tests = \
- ipi \
-
-rv64si_sc_vec_tests = \
-
-#--------------------------------------------------------------------
-# Build rules
-#--------------------------------------------------------------------
-
-RISCV_GCC = riscv-gcc
-RISCV_GCC_OPTS = -nostdlib -nostartfiles
-RISCV_OBJDUMP = riscv-objdump --disassemble-all --disassemble-zeroes --section=.text --section=.data --section=.bss
-RISCV_SIM = riscv-isa-run
-
-#------------------------------------------------------------
-# Build assembly tests
-
-%.hex: %
- elf2hex 16 16384 $< > $@
-
-%.dump: %
- $(RISCV_OBJDUMP) $< > $@
-
-%.out: %
- $(RISCV_SIM) $< 2> $@
-
-rv64si_p_tests_bin = $(addprefix rv64si-p-, $(rv64si_sc_tests))
-rv64si_p_tests_dump = $(addsuffix .dump, $(rv64si_p_tests_bin))
-rv64si_p_tests_hex = $(addsuffix .hex, $(rv64si_p_tests_bin))
-rv64si_p_tests_out = $(addsuffix .out, $(rv64si_p_tests_bin))
-
-$(rv64si_p_tests_bin): rv64si-p-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -I../../env/p -I../macros/scalar -T../../env/p/link.ld $< -o $@
-
-rv64si_pm_tests_bin = $(addprefix rv64si-pm-, $(rv64si_mc_tests))
-rv64si_pm_tests_dump = $(addsuffix .dump, $(rv64si_pm_tests_bin))
-rv64si_pm_tests_hex = $(addsuffix .hex, $(rv64si_pm_tests_bin))
-rv64si_pm_tests_out = $(addsuffix .out, $(rv64si_pm_tests_bin))
-
-$(rv64si_pm_tests_bin): rv64si-pm-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -I../../env/pm -I../macros/scalar -T../../env/pm/link.ld $< -o $@
-
-rv64si_p_vec_tests_bin = $(addprefix rv64si-p-vec-, $(rv64si_sc_vec_tests))
-rv64si_p_vec_tests_dump = $(addsuffix .dump, $(rv64si_p_vec_tests_bin))
-rv64si_p_vec_tests_hex = $(addsuffix .hex, $(rv64si_p_vec_tests_bin))
-rv64si_p_vec_tests_out = $(addsuffix .out, $(rv64si_p_vec_tests_bin))
-
-$(rv64si_p_vec_tests_bin): rv64si-p-vec-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -I../../env/p -I../macros/vector -T../../env/p/link.ld $< -o $@
-
-rv64si_pt_vec_tests_bin = $(addprefix rv64si-pt-vec-, $(rv64si_sc_vec_tests))
-rv64si_pt_vec_tests_dump = $(addsuffix .dump, $(rv64si_pt_vec_tests_bin))
-rv64si_pt_vec_tests_hex = $(addsuffix .hex, $(rv64si_pt_vec_tests_bin))
-rv64si_pt_vec_tests_out = $(addsuffix .out, $(rv64si_pt_vec_tests_bin))
-
-$(rv64si_pt_vec_tests_bin): rv64si-pt-vec-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -I../../env/pt -I../macros/vector -T../../env/pt/link.ld $< -o $@
-
-riscv-: \
- $(rv64si_p_tests_dump) $(rv64si_p_tests_hex) \
- $(rv64si_pm_tests_dump) $(rv64si_pm_tests_hex) \
- $(rv64si_p_vec_tests_dump) $(rv64si_p_vec_tests_hex) \
- $(rv64si_pt_vec_tests_dump) $(rv64si_pt_vec_tests_hex) \
-
-out = $(rv64si_p_tests_out) $(rv64si_pm_tests_out) $(rv64si_p_vec_tests_out)
-
-run: $(out)
- echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' \
- $(out); echo;
-
-junk += \
- $(rv64si_p_tests_bin) $(rv64si_p_tests_dump) $(rv64si_p_tests_hex) $(rv64si_p_tests_out) \
- $(rv64si_pm_tests_bin) $(rv64si_pm_tests_dump) $(rv64si_pm_tests_hex) $(rv64si_pm_tests_out) \
- $(rv64si_p_vec_tests_bin) $(rv64si_p_vec_tests_dump) $(rv64si_p_vec_tests_hex) $(rv64si_p_vec_tests_out) \
- $(rv64si_pt_vec_tests_bin) $(rv64si_pt_vec_tests_dump) $(rv64si_pt_vec_tests_hex) $(rv64si_pt_vec_tests_out) \
-
-#------------------------------------------------------------
-# Default
-
-all: riscv-
-
-#------------------------------------------------------------
-# Clean up
-
-clean:
- rm -rf $(junk)
--- /dev/null
+#=======================================================================
+# Makefrag for rv64si tests
+#-----------------------------------------------------------------------
+
+rv64si_sc_tests = \
+ coreid \
+
+rv64si_mc_tests = \
+ ipi \
+
+rv64si_p_tests = $(addprefix rv64si-p-, $(rv64si_sc_tests))
+rv64si_pm_tests = $(addprefix rv64si-pm-, $(rv64si_mc_tests))
+
+spike_tests += $(rv64si_p_tests) $(rv64si_pm_tests)
+++ /dev/null
-#=======================================================================
-# Makefile for riscv-tests
-#-----------------------------------------------------------------------
-
-default: all
-
-#--------------------------------------------------------------------
-# Sources
-#--------------------------------------------------------------------
-
-rv64sv_sc_tests = \
- illegal_tvec_cmd illegal_tvec_regid \
- illegal_vt_inst illegal_vt_regid \
- ma_utld ma_utsd ma_vld ma_vsd \
- ma_vt_inst \
-
-rv64sv_mc_tests = \
-
-rv64sv_sc_vec_tests = \
-
-#--------------------------------------------------------------------
-# Build rules
-#--------------------------------------------------------------------
-
-RISCV_GCC = riscv-gcc
-RISCV_GCC_OPTS = -nostdlib -nostartfiles
-RISCV_OBJDUMP = riscv-objdump --disassemble-all --disassemble-zeroes --section=.text --section=.data --section=.bss
-RISCV_SIM = riscv-isa-run
-
-#------------------------------------------------------------
-# Build assembly tests
-
-%.hex: %
- elf2hex 16 16384 $< > $@
-
-%.dump: %
- $(RISCV_OBJDUMP) $< > $@
-
-%.out: %
- $(RISCV_SIM) $< 2> $@
-
-rv64sv_p_tests_bin = $(addprefix rv64sv-p-, $(rv64sv_sc_tests))
-rv64sv_p_tests_dump = $(addsuffix .dump, $(rv64sv_p_tests_bin))
-rv64sv_p_tests_hex = $(addsuffix .hex, $(rv64sv_p_tests_bin))
-rv64sv_p_tests_out = $(addsuffix .out, $(rv64sv_p_tests_bin))
-
-$(rv64sv_p_tests_bin): rv64sv-p-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -I../../env/p -I../macros/scalar -T../../env/p/link.ld $< -o $@
-
-rv64sv_pm_tests_bin = $(addprefix rv64sv-pm-, $(rv64sv_mc_tests))
-rv64sv_pm_tests_dump = $(addsuffix .dump, $(rv64sv_pm_tests_bin))
-rv64sv_pm_tests_hex = $(addsuffix .hex, $(rv64sv_pm_tests_bin))
-rv64sv_pm_tests_out = $(addsuffix .out, $(rv64sv_pm_tests_bin))
-
-$(rv64sv_pm_tests_bin): rv64sv-pm-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -I../../env/pm -I../macros/scalar -T../../env/pm/link.ld $< -o $@
-
-rv64sv_p_vec_tests_bin = $(addprefix rv64sv-p-vec-, $(rv64sv_sc_vec_tests))
-rv64sv_p_vec_tests_dump = $(addsuffix .dump, $(rv64sv_p_vec_tests_bin))
-rv64sv_p_vec_tests_hex = $(addsuffix .hex, $(rv64sv_p_vec_tests_bin))
-rv64sv_p_vec_tests_out = $(addsuffix .out, $(rv64sv_p_vec_tests_bin))
-
-$(rv64sv_p_vec_tests_bin): rv64sv-p-vec-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -I../../env/p -I../macros/vector -T../../env/p/link.ld $< -o $@
-
-rv64sv_pt_vec_tests_bin = $(addprefix rv64sv-pt-vec-, $(rv64sv_sc_vec_tests))
-rv64sv_pt_vec_tests_dump = $(addsuffix .dump, $(rv64sv_pt_vec_tests_bin))
-rv64sv_pt_vec_tests_hex = $(addsuffix .hex, $(rv64sv_pt_vec_tests_bin))
-rv64sv_pt_vec_tests_out = $(addsuffix .out, $(rv64sv_pt_vec_tests_bin))
-
-$(rv64sv_pt_vec_tests_bin): rv64sv-pt-vec-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -I../../env/pt -I../macros/vector -T../../env/pt/link.ld $< -o $@
-
-riscv-: \
- $(rv64sv_p_tests_dump) $(rv64sv_p_tests_hex) \
- $(rv64sv_pm_tests_dump) $(rv64sv_pm_tests_hex) \
- $(rv64sv_p_vec_tests_dump) $(rv64sv_p_vec_tests_hex) \
- $(rv64sv_pt_vec_tests_dump) $(rv64sv_pt_vec_tests_hex) \
-
-out =
-
-run: $(out)
- echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' \
- $(out); echo;
-
-junk += \
- $(rv64sv_p_tests_bin) $(rv64sv_p_tests_dump) $(rv64sv_p_tests_hex) $(rv64sv_p_tests_out) \
- $(rv64sv_pm_tests_bin) $(rv64sv_pm_tests_dump) $(rv64sv_pm_tests_hex) $(rv64sv_pm_tests_out) \
- $(rv64sv_p_vec_tests_bin) $(rv64sv_p_vec_tests_dump) $(rv64sv_p_vec_tests_hex) $(rv64sv_p_vec_tests_out) \
- $(rv64sv_pt_vec_tests_bin) $(rv64sv_pt_vec_tests_dump) $(rv64sv_pt_vec_tests_hex) $(rv64sv_pt_vec_tests_out) \
-
-#------------------------------------------------------------
-# Default
-
-all: riscv-
-
-#------------------------------------------------------------
-# Clean up
-
-clean:
- rm -rf $(junk)
--- /dev/null
+#=======================================================================
+# Makefrag for rv64sv tests
+#-----------------------------------------------------------------------
+
+rv64sv_sc_tests = \
+ illegal_tvec_cmd illegal_tvec_regid \
+ illegal_vt_inst illegal_vt_regid \
+ ma_utld ma_utsd ma_vld ma_vsd \
+ ma_vt_inst \
+
+rv64sv_p_tests = $(addprefix rv64sv-p-, $(rv64sv_sc_tests))
+++ /dev/null
-#=======================================================================
-# Makefile for riscv-tests
-#-----------------------------------------------------------------------
-
-default: all
-
-#--------------------------------------------------------------------
-# Sources
-#--------------------------------------------------------------------
-
-rv64uf_sc_tests = \
- fadd fcmp fcvt fcvt_w fmadd fmin fsgnj \
- ldst move structural \
-
-rv64uf_mc_tests =\
-
-rv64uf_sc_vec_tests = \
- fadd fcmp fcvt fcvt_w fmadd fmin fsgnj \
-
-#--------------------------------------------------------------------
-# Build rules
-#--------------------------------------------------------------------
-
-RISCV_GCC = riscv-gcc
-RISCV_GCC_OPTS = -nostdlib -nostartfiles
-RISCV_OBJDUMP = riscv-objdump --disassemble-all --disassemble-zeroes --section=.text --section=.data --section=.bss
-RISCV_SIM = riscv-isa-run
-
-#------------------------------------------------------------
-# Build assembly tests
-
-%.hex: %
- elf2hex 16 16384 $< > $@
-
-%.dump: %
- $(RISCV_OBJDUMP) $< > $@
-
-%.out: %
- $(RISCV_SIM) $< 2> $@
-
-rv64uf_p_tests_bin = $(addprefix rv64uf-p-, $(rv64uf_sc_tests))
-rv64uf_p_tests_dump = $(addsuffix .dump, $(rv64uf_p_tests_bin))
-rv64uf_p_tests_hex = $(addsuffix .hex, $(rv64uf_p_tests_bin))
-rv64uf_p_tests_out = $(addsuffix .out, $(rv64uf_p_tests_bin))
-
-$(rv64uf_p_tests_bin): rv64uf-p-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -I../../env/p -I../macros/scalar -T../../env/p/link.ld $< -o $@
-
-rv64uf_pm_tests_bin = $(addprefix rv64uf-pm-, $(rv64uf_mc_tests))
-rv64uf_pm_tests_dump = $(addsuffix .dump, $(rv64uf_pm_tests_bin))
-rv64uf_pm_tests_hex = $(addsuffix .hex, $(rv64uf_pm_tests_bin))
-rv64uf_pm_tests_out = $(addsuffix .out, $(rv64uf_pm_tests_bin))
-
-$(rv64uf_pm_tests_bin): rv64uf-pm-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -I../../env/pm -I../macros/scalar -T../../env/pm/link.ld $< -o $@
-
-rv64uf_v_tests_bin = $(addprefix rv64uf-v-, $(rv64uf_sc_tests))
-rv64uf_v_tests_dump = $(addsuffix .dump, $(rv64uf_v_tests_bin))
-rv64uf_v_tests_hex = $(addsuffix .hex, $(rv64uf_v_tests_bin))
-rv64uf_v_tests_out = $(addsuffix .out, $(rv64uf_v_tests_bin))
-
-$(rv64uf_v_tests_bin): rv64uf-v-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -std=gnu99 -O2 -I../../env/v -I../macros/scalar -T../../env/v/link.ld ../../env/v/entry.S ../../env/v/vm.c $< -lc -o $@
-
-rv64uf_p_vec_tests_bin = $(addprefix rv64uf-p-vec-, $(rv64uf_sc_vec_tests))
-rv64uf_p_vec_tests_dump = $(addsuffix .dump, $(rv64uf_p_vec_tests_bin))
-rv64uf_p_vec_tests_hex = $(addsuffix .hex, $(rv64uf_p_vec_tests_bin))
-rv64uf_p_vec_tests_out = $(addsuffix .out, $(rv64uf_p_vec_tests_bin))
-
-$(rv64uf_p_vec_tests_bin): rv64uf-p-vec-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -I../../env/p -I../macros/vector -T../../env/p/link.ld $< -o $@
-
-rv64uf_pt_vec_tests_bin = $(addprefix rv64uf-pt-vec-, $(rv64uf_sc_vec_tests))
-rv64uf_pt_vec_tests_dump = $(addsuffix .dump, $(rv64uf_pt_vec_tests_bin))
-rv64uf_pt_vec_tests_hex = $(addsuffix .hex, $(rv64uf_pt_vec_tests_bin))
-rv64uf_pt_vec_tests_out = $(addsuffix .out, $(rv64uf_pt_vec_tests_bin))
-
-$(rv64uf_pt_vec_tests_bin): rv64uf-pt-vec-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -I../../env/pt -I../macros/vector -T../../env/pt/link.ld $< -o $@
-
-rv64uf_v_vec_tests_bin = $(addprefix rv64uf-v-vec-, $(rv64uf_sc_vec_tests))
-rv64uf_v_vec_tests_dump = $(addsuffix .dump, $(rv64uf_v_vec_tests_bin))
-rv64uf_v_vec_tests_hex = $(addsuffix .hex, $(rv64uf_v_vec_tests_bin))
-rv64uf_v_vec_tests_out = $(addsuffix .out, $(rv64uf_v_vec_tests_bin))
-
-$(rv64uf_v_vec_tests_bin): rv64uf-v-vec-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -std=gnu99 -O2 -I../../env/v -I../macros/vector -T../../env/v/link.ld ../../env/v/entry.S ../../env/v/vm.c $< -lc -o $@
-
-riscv-: \
- $(rv64uf_p_tests_dump) $(rv64uf_p_tests_hex) \
- $(rv64uf_pm_tests_dump) $(rv64uf_pm_tests_hex) \
- $(rv64uf_v_tests_dump) $(rv64uf_v_tests_hex) \
- $(rv64uf_p_vec_tests_dump) $(rv64uf_p_vec_tests_hex) \
- $(rv64uf_pt_vec_tests_dump) $(rv64uf_pt_vec_tests_hex) \
- $(rv64uf_v_vec_tests_dump) $(rv64uf_v_vec_tests_hex) \
-
-out = $(rv64uf_p_tests_out) $(rv64uf_pm_tests_out) $(rv64uf_v_tests_out) $(rv64uf_p_vec_tests_out) $(rv64uf_v_vec_tests_out)
-
-run: $(out)
- echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' \
- $(out); echo;
-
-junk += \
- $(rv64uf_p_tests_bin) $(rv64uf_p_tests_dump) $(rv64uf_p_tests_hex) $(rv64uf_p_tests_out) \
- $(rv64uf_pm_tests_bin) $(rv64uf_pm_tests_dump) $(rv64uf_pm_tests_hex) $(rv64uf_pm_tests_out) \
- $(rv64uf_v_tests_bin) $(rv64uf_v_tests_dump) $(rv64uf_v_tests_hex) $(rv64uf_v_tests_out) \
- $(rv64uf_p_vec_tests_bin) $(rv64uf_p_vec_tests_dump) $(rv64uf_p_vec_tests_hex) $(rv64uf_p_vec_tests_out) \
- $(rv64uf_pt_vec_tests_bin) $(rv64uf_pt_vec_tests_dump) $(rv64uf_pt_vec_tests_hex) $(rv64uf_pt_vec_tests_out) \
- $(rv64uf_v_vec_tests_bin) $(rv64uf_v_vec_tests_dump) $(rv64uf_v_vec_tests_hex) $(rv64uf_v_vec_tests_out) \
-
-#------------------------------------------------------------
-# Default
-
-all: riscv-
-
-#------------------------------------------------------------
-# Clean up
-
-clean:
- rm -rf $(junk)
--- /dev/null
+#=======================================================================
+# Makefrag for rv64uf tests
+#-----------------------------------------------------------------------
+
+rv64uf_sc_tests = \
+ fadd fcmp fcvt fcvt_w fmadd fmin fsgnj \
+ ldst move structural \
+
+rv64uf_sc_vec_tests = \
+ fadd fcmp fcvt fcvt_w fmadd fmin fsgnj \
+
+rv64uf_p_tests = $(addprefix rv64uf-p-, $(rv64uf_sc_tests))
+rv64uf_v_tests = $(addprefix rv64uf-v-, $(rv64uf_sc_tests))
+rv64uf_p_vec_tests = $(addprefix rv64uf-p-vec-, $(rv64uf_sc_vec_tests))
+rv64uf_pt_vec_tests = $(addprefix rv64uf-pt-vec-, $(rv64uf_sc_vec_tests))
+rv64uf_v_vec_tests = $(addprefix rv64uf-v-vec-, $(rv64uf_sc_vec_tests))
+
+spike_tests += $(rv64uf_p_tests) $(rv64uf_v_tests) $(rv64uf_p_vec_tests) $(rv64uf_pt_vec_tests) $(rv64uf_v_vec_tests)
+++ /dev/null
-#=======================================================================
-# Makefile for riscv-tests
-#-----------------------------------------------------------------------
-
-default: all
-
-#--------------------------------------------------------------------
-# Sources
-#--------------------------------------------------------------------
-
-rv64ui_sc_tests = \
- add addi addiw addw \
- amoadd_d amoand_d amomax_d amomaxu_d amomin_d amominu_d amoor_d amoswap_d \
- amoadd_w amoand_w amomax_w amomaxu_w amomin_w amominu_w amoor_w amoswap_w \
- and andi \
- auipc \
- beq bge bgeu blt bltu bne \
- div divu divuw divw \
- example simple \
- fence_i \
- j jal jalr jalr_j jalr_r \
- lb lbu lh lhu lw lwu ld \
- lui \
- mul mulh mulhsu mulhu mulw \
- or ori \
- rem remu remuw remw \
- sb sh sw sd \
- sll slli slliw sllw \
- slt slti sltiu sltu \
- sra srai sraiw sraw \
- srl srli srliw srlw \
- sub subw \
- xor xori \
-
-rv64ui_mc_tests =\
- lrsc
-
-rv64ui_sc_vec_tests = \
- add addi addiw addw \
- and andi \
- lui \
- mul mulh mulhsu mulhu mulw \
- or ori \
- sll slli slliw sllw \
- slt slti sltiu sltu \
- sra srai sraiw sraw \
- srl srli srliw srlw \
- sub subw \
- xor xori \
-
-#--------------------------------------------------------------------
-# Build rules
-#--------------------------------------------------------------------
-
-RISCV_GCC = riscv-gcc
-RISCV_GCC_OPTS = -nostdlib -nostartfiles
-RISCV_OBJDUMP = riscv-objdump --disassemble-all --disassemble-zeroes --section=.text --section=.data --section=.bss
-RISCV_SIM = riscv-isa-run
-
-#------------------------------------------------------------
-# Build assembly tests
-
-%.hex: %
- elf2hex 16 16384 $< > $@
-
-%.dump: %
- $(RISCV_OBJDUMP) $< > $@
-
-%.out: %
- $(RISCV_SIM) $< 2> $@
-
-rv64ui_p_tests_bin = $(addprefix rv64ui-p-, $(rv64ui_sc_tests))
-rv64ui_p_tests_dump = $(addsuffix .dump, $(rv64ui_p_tests_bin))
-rv64ui_p_tests_hex = $(addsuffix .hex, $(rv64ui_p_tests_bin))
-rv64ui_p_tests_out = $(addsuffix .out, $(rv64ui_p_tests_bin))
-
-$(rv64ui_p_tests_bin): rv64ui-p-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -I../../env/p -I../macros/scalar -T../../env/p/link.ld $< -o $@
-
-rv64ui_pm_tests_bin = $(addprefix rv64ui-pm-, $(rv64ui_mc_tests))
-rv64ui_pm_tests_dump = $(addsuffix .dump, $(rv64ui_pm_tests_bin))
-rv64ui_pm_tests_hex = $(addsuffix .hex, $(rv64ui_pm_tests_bin))
-rv64ui_pm_tests_out = $(addsuffix .out, $(rv64ui_pm_tests_bin))
-
-$(rv64ui_pm_tests_bin): rv64ui-pm-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -I../../env/pm -I../macros/scalar -T../../env/pm/link.ld $< -o $@
-
-rv64ui_v_tests_bin = $(addprefix rv64ui-v-, $(rv64ui_sc_tests))
-rv64ui_v_tests_dump = $(addsuffix .dump, $(rv64ui_v_tests_bin))
-rv64ui_v_tests_hex = $(addsuffix .hex, $(rv64ui_v_tests_bin))
-rv64ui_v_tests_out = $(addsuffix .out, $(rv64ui_v_tests_bin))
-
-$(rv64ui_v_tests_bin): rv64ui-v-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -std=gnu99 -O2 -I../../env/v -I../macros/scalar -T../../env/v/link.ld ../../env/v/entry.S ../../env/v/vm.c $< -lc -o $@
-
-rv64ui_p_vec_tests_bin = $(addprefix rv64ui-p-vec-, $(rv64ui_sc_vec_tests))
-rv64ui_p_vec_tests_dump = $(addsuffix .dump, $(rv64ui_p_vec_tests_bin))
-rv64ui_p_vec_tests_hex = $(addsuffix .hex, $(rv64ui_p_vec_tests_bin))
-rv64ui_p_vec_tests_out = $(addsuffix .out, $(rv64ui_p_vec_tests_bin))
-
-$(rv64ui_p_vec_tests_bin): rv64ui-p-vec-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -I../../env/p -I../macros/vector -T../../env/p/link.ld $< -o $@
-
-rv64ui_pt_vec_tests_bin = $(addprefix rv64ui-pt-vec-, $(rv64ui_sc_vec_tests))
-rv64ui_pt_vec_tests_dump = $(addsuffix .dump, $(rv64ui_pt_vec_tests_bin))
-rv64ui_pt_vec_tests_hex = $(addsuffix .hex, $(rv64ui_pt_vec_tests_bin))
-rv64ui_pt_vec_tests_out = $(addsuffix .out, $(rv64ui_pt_vec_tests_bin))
-
-$(rv64ui_pt_vec_tests_bin): rv64ui-pt-vec-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -I../../env/pt -I../macros/vector -T../../env/pt/link.ld $< -o $@
-
-rv64ui_v_vec_tests_bin = $(addprefix rv64ui-v-vec-, $(rv64ui_sc_vec_tests))
-rv64ui_v_vec_tests_dump = $(addsuffix .dump, $(rv64ui_v_vec_tests_bin))
-rv64ui_v_vec_tests_hex = $(addsuffix .hex, $(rv64ui_v_vec_tests_bin))
-rv64ui_v_vec_tests_out = $(addsuffix .out, $(rv64ui_v_vec_tests_bin))
-
-$(rv64ui_v_vec_tests_bin): rv64ui-v-vec-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -std=gnu99 -O2 -I../../env/v -I../macros/vector -T../../env/v/link.ld ../../env/v/entry.S ../../env/v/vm.c $< -lc -o $@
-
-riscv-: \
- $(rv64ui_p_tests_dump) $(rv64ui_p_tests_hex) \
- $(rv64ui_pm_tests_dump) $(rv64ui_pm_tests_hex) \
- $(rv64ui_v_tests_dump) $(rv64ui_v_tests_hex) \
- $(rv64ui_p_vec_tests_dump) $(rv64ui_p_vec_tests_hex) \
- $(rv64ui_pt_vec_tests_dump) $(rv64ui_pt_vec_tests_hex) \
- $(rv64ui_v_vec_tests_dump) $(rv64ui_v_vec_tests_hex) \
-
-out = $(rv64ui_p_tests_out) $(rv64ui_pm_tests_out) $(rv64ui_v_tests_out) $(rv64ui_p_vec_tests_out) $(rv64ui_v_vec_tests_out)
-
-run: $(out)
- echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' \
- $(out); echo;
-
-junk += \
- $(rv64ui_p_tests_bin) $(rv64ui_p_tests_dump) $(rv64ui_p_tests_hex) $(rv64ui_p_tests_out) \
- $(rv64ui_pm_tests_bin) $(rv64ui_pm_tests_dump) $(rv64ui_pm_tests_hex) $(rv64ui_pm_tests_out) \
- $(rv64ui_v_tests_bin) $(rv64ui_v_tests_dump) $(rv64ui_v_tests_hex) $(rv64ui_v_tests_out) \
- $(rv64ui_p_vec_tests_bin) $(rv64ui_p_vec_tests_dump) $(rv64ui_p_vec_tests_hex) $(rv64ui_p_vec_tests_out) \
- $(rv64ui_pt_vec_tests_bin) $(rv64ui_pt_vec_tests_dump) $(rv64ui_pt_vec_tests_hex) $(rv64ui_pt_vec_tests_out) \
- $(rv64ui_v_vec_tests_bin) $(rv64ui_v_vec_tests_dump) $(rv64ui_v_vec_tests_hex) $(rv64ui_v_vec_tests_out) \
-
-#------------------------------------------------------------
-# Default
-
-all: riscv-
-
-#------------------------------------------------------------
-# Clean up
-
-clean:
- rm -rf $(junk)
--- /dev/null
+#=======================================================================
+# Makefrag for rv64ui tests
+#-----------------------------------------------------------------------
+
+rv64ui_sc_tests = \
+ add addi addiw addw \
+ amoadd_d amoand_d amomax_d amomaxu_d amomin_d amominu_d amoor_d amoswap_d \
+ amoadd_w amoand_w amomax_w amomaxu_w amomin_w amominu_w amoor_w amoswap_w \
+ and andi \
+ auipc \
+ beq bge bgeu blt bltu bne \
+ div divu divuw divw \
+ example simple \
+ fence_i \
+ j jal jalr jalr_j jalr_r \
+ lb lbu lh lhu lw lwu ld \
+ lui \
+ mul mulh mulhsu mulhu mulw \
+ or ori \
+ rem remu remuw remw \
+ sb sh sw sd \
+ sll slli slliw sllw \
+ slt slti sltiu sltu \
+ sra srai sraiw sraw \
+ srl srli srliw srlw \
+ sub subw \
+ xor xori \
+
+rv64ui_mc_tests = \
+ lrsc
+
+rv64ui_sc_vec_tests = \
+ add addi addiw addw \
+ and andi \
+ lui \
+ mul mulh mulhsu mulhu mulw \
+ or ori \
+ sll slli slliw sllw \
+ slt slti sltiu sltu \
+ sra srai sraiw sraw \
+ srl srli srliw srlw \
+ sub subw \
+ xor xori \
+
+rv64ui_p_tests = $(addprefix rv64ui-p-, $(rv64ui_sc_tests))
+rv64ui_pm_tests = $(addprefix rv64ui-pm-, $(rv64ui_mc_tests))
+rv64ui_v_tests = $(addprefix rv64ui-v-, $(rv64ui_sc_tests))
+rv64ui_p_vec_tests = $(addprefix rv64ui-p-vec-, $(rv64ui_sc_vec_tests))
+rv64ui_pt_vec_tests = $(addprefix rv64ui-pt-vec-, $(rv64ui_sc_vec_tests))
+rv64ui_v_vec_tests = $(addprefix rv64ui-v-vec-, $(rv64ui_sc_vec_tests))
+
+spike_tests += $(rv64ui_p_tests) $(rv64ui_pm_tests) $(rv64ui_v_tests) $(rv64ui_p_vec_tests) $(rv64ui_pt_vec_tests) $(rv64ui_v_vec_tests)
+++ /dev/null
-#=======================================================================
-# Makefile for riscv-tests
-#-----------------------------------------------------------------------
-
-default: all
-
-#--------------------------------------------------------------------
-# Sources
-#--------------------------------------------------------------------
-
-rv64uv_sc_tests = \
- wakeup fence \
- vvcfgivl vvcfg vsetvl \
- vfmvv vmsv vmvv \
- utidx \
- lb lbu lh lhu lw lwu ld \
- sb sh sw sd \
- fld flw \
- fsd fsw \
- amoadd_d amoand_d amomax_d amomaxu_d amomin_d amominu_d amoor_d amoswap_d \
- amoadd_w amoand_w amomax_w amomaxu_w amomin_w amominu_w amoor_w amoswap_w \
- imul \
- movn movz \
- fcvt fma \
- fmovn fmovz \
- vvadd_d vvadd_w vvadd_fd vvadd_fw \
- vvmul_d \
- vvadd_branch \
-
-rv64uv_mc_tests = \
-
-rv64uv_sc_vec_tests = \
- beq bge bgeu blt bltu bne \
-
-#--------------------------------------------------------------------
-# Build rules
-#--------------------------------------------------------------------
-
-RISCV_GCC = riscv-gcc
-RISCV_GCC_OPTS = -nostdlib -nostartfiles
-RISCV_OBJDUMP = riscv-objdump --disassemble-all --disassemble-zeroes --section=.text --section=.data --section=.bss
-RISCV_SIM = riscv-isa-run
-
-#------------------------------------------------------------
-# Build assembly tests
-
-%.hex: %
- elf2hex 16 16384 $< > $@
-
-%.dump: %
- $(RISCV_OBJDUMP) $< > $@
-
-%.out: %
- $(RISCV_SIM) $< 2> $@
-
-rv64uv_p_tests_bin = $(addprefix rv64uv-p-, $(rv64uv_sc_tests))
-rv64uv_p_tests_dump = $(addsuffix .dump, $(rv64uv_p_tests_bin))
-rv64uv_p_tests_hex = $(addsuffix .hex, $(rv64uv_p_tests_bin))
-rv64uv_p_tests_out = $(addsuffix .out, $(rv64uv_p_tests_bin))
-
-$(rv64uv_p_tests_bin): rv64uv-p-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -I../../env/p -I../macros/scalar -T../../env/p/link.ld $< -o $@
-
-rv64uv_pm_tests_bin = $(addprefix rv64uv-pm-, $(rv64uv_mc_tests))
-rv64uv_pm_tests_dump = $(addsuffix .dump, $(rv64uv_pm_tests_bin))
-rv64uv_pm_tests_hex = $(addsuffix .hex, $(rv64uv_pm_tests_bin))
-rv64uv_pm_tests_out = $(addsuffix .out, $(rv64uv_pm_tests_bin))
-
-$(rv64uv_pm_tests_bin): rv64uv-pm-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -I../../env/pm -I../macros/scalar -T../../env/pm/link.ld $< -o $@
-
-rv64uv_v_tests_bin = $(addprefix rv64uv-v-, $(rv64uv_sc_tests))
-rv64uv_v_tests_dump = $(addsuffix .dump, $(rv64uv_v_tests_bin))
-rv64uv_v_tests_hex = $(addsuffix .hex, $(rv64uv_v_tests_bin))
-rv64uv_v_tests_out = $(addsuffix .out, $(rv64uv_v_tests_bin))
-
-$(rv64uv_v_tests_bin): rv64uv-v-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -std=gnu99 -O2 -I../../env/v -I../macros/scalar -T../../env/v/link.ld ../../env/v/entry.S ../../env/v/vm.c $< -lc -o $@
-
-rv64uv_p_vec_tests_bin = $(addprefix rv64uv-p-vec-, $(rv64uv_sc_vec_tests))
-rv64uv_p_vec_tests_dump = $(addsuffix .dump, $(rv64uv_p_vec_tests_bin))
-rv64uv_p_vec_tests_hex = $(addsuffix .hex, $(rv64uv_p_vec_tests_bin))
-rv64uv_p_vec_tests_out = $(addsuffix .out, $(rv64uv_p_vec_tests_bin))
-
-$(rv64uv_p_vec_tests_bin): rv64uv-p-vec-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -I../../env/p -I../macros/vector -T../../env/p/link.ld $< -o $@
-
-rv64uv_pt_vec_tests_bin = $(addprefix rv64uv-pt-vec-, $(rv64uv_sc_vec_tests))
-rv64uv_pt_vec_tests_dump = $(addsuffix .dump, $(rv64uv_pt_vec_tests_bin))
-rv64uv_pt_vec_tests_hex = $(addsuffix .hex, $(rv64uv_pt_vec_tests_bin))
-rv64uv_pt_vec_tests_out = $(addsuffix .out, $(rv64uv_pt_vec_tests_bin))
-
-$(rv64uv_pt_vec_tests_bin): rv64uv-pt-vec-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -I../../env/pt -I../macros/vector -T../../env/pt/link.ld $< -o $@
-
-rv64uv_v_vec_tests_bin = $(addprefix rv64uv-v-vec-, $(rv64uv_sc_vec_tests))
-rv64uv_v_vec_tests_dump = $(addsuffix .dump, $(rv64uv_v_vec_tests_bin))
-rv64uv_v_vec_tests_hex = $(addsuffix .hex, $(rv64uv_v_vec_tests_bin))
-rv64uv_v_vec_tests_out = $(addsuffix .out, $(rv64uv_v_vec_tests_bin))
-
-$(rv64uv_v_vec_tests_bin): rv64uv-v-vec-%: %.S
- $(RISCV_GCC) $(RISCV_GCC_OPTS) -std=gnu99 -O2 -I../../env/v -I../macros/vector -T../../env/v/link.ld ../../env/v/entry.S ../../env/v/vm.c $< -lc -o $@
-
-riscv-: \
- $(rv64uv_p_tests_dump) $(rv64uv_p_tests_hex) \
- $(rv64uv_pm_tests_dump) $(rv64uv_pm_tests_hex) \
- $(rv64uv_v_tests_dump) $(rv64uv_v_tests_hex) \
- $(rv64uv_p_vec_tests_dump) $(rv64uv_p_vec_tests_hex) \
- $(rv64uv_pt_vec_tests_dump) $(rv64uv_pt_vec_tests_hex) \
- $(rv64uv_v_vec_tests_dump) $(rv64uv_v_vec_tests_hex) \
-
-out = $(rv64uv_p_tests_out) $(rv64uv_pm_tests_out)
-
-run: $(out)
- echo; perl -ne 'print " [$$1] $$ARGV \t$$2\n" if /\*{3}(.{8})\*{3}(.*)/' \
- $(out); echo;
-
-junk += \
- $(rv64uv_p_tests_bin) $(rv64uv_p_tests_dump) $(rv64uv_p_tests_hex) $(rv64uv_p_tests_out) \
- $(rv64uv_pm_tests_bin) $(rv64uv_pm_tests_dump) $(rv64uv_pm_tests_hex) $(rv64uv_pm_tests_out) \
- $(rv64uv_v_tests_bin) $(rv64uv_v_tests_dump) $(rv64uv_v_tests_hex) $(rv64uv_v_tests_out) \
- $(rv64uv_p_vec_tests_bin) $(rv64uv_p_vec_tests_dump) $(rv64uv_p_vec_tests_hex) $(rv64uv_p_vec_tests_out) \
- $(rv64uv_pt_vec_tests_bin) $(rv64uv_pt_vec_tests_dump) $(rv64uv_pt_vec_tests_hex) $(rv64uv_pt_vec_tests_out) \
- $(rv64uv_v_vec_tests_bin) $(rv64uv_v_vec_tests_dump) $(rv64uv_v_vec_tests_hex) $(rv64uv_v_vec_tests_out) \
-
-#------------------------------------------------------------
-# Default
-
-all: riscv-
-
-#------------------------------------------------------------
-# Clean up
-
-clean:
- rm -rf $(junk)
--- /dev/null
+#=======================================================================
+# Makefrag for rv64uv tests
+#-----------------------------------------------------------------------
+
+rv64uv_sc_tests = \
+ wakeup fence \
+ vvcfgivl vvcfg vsetvl \
+ vfmvv vmsv vmvv \
+ utidx \
+ lb lbu lh lhu lw lwu ld \
+ sb sh sw sd \
+ fld flw \
+ fsd fsw \
+ amoadd_d amoand_d amomax_d amomaxu_d amomin_d amominu_d amoor_d amoswap_d \
+ amoadd_w amoand_w amomax_w amomaxu_w amomin_w amominu_w amoor_w amoswap_w \
+ imul \
+ movn movz \
+ fcvt fma \
+ fmovn fmovz \
+ vvadd_d vvadd_w vvadd_fd vvadd_fw \
+ vvmul_d \
+ vvadd_branch \
+
+rv64uv_sc_vec_tests = \
+ beq bge bgeu blt bltu bne \
+
+rv64uv_p_tests = $(addprefix rv64uv-p-, $(rv64uv_sc_tests))
+rv64uv_pt_tests = $(addprefix rv64uv-pt-, $(rv64uv_sc_tests))
+rv64uv_v_tests = $(addprefix rv64uv-v-, $(rv64uv_sc_tests))
+rv64uv_p_vec_tests = $(addprefix rv64uv-p-vec-, $(rv64uv_sc_vec_tests))
+rv64uv_pt_vec_tests = $(addprefix rv64uv-pt-vec-, $(rv64uv_sc_vec_tests))
+rv64uv_v_vec_tests = $(addprefix rv64uv-v-vec-, $(rv64uv_sc_vec_tests))
+
+spike_tests += $(rv64uv_p_tests)