diff --git a/arch_test_target/spike/device/Makefile_common.inc b/arch_test_target/spike/device/Makefile_common.inc new file mode 100644 index 00000000..c43222de --- /dev/null +++ b/arch_test_target/spike/device/Makefile_common.inc @@ -0,0 +1,34 @@ +TARGET_SIM ?= spike +TARGET_FLAGS ?= $(RISCV_TARGET_FLAGS) +ifeq ($(shell command -v $(TARGET_SIM) 2> /dev/null),) + $(error Target simulator executable '$(TARGET_SIM)` not found) +endif + +RISCV_PREFIX ?= riscv$(XLEN)-unknown-elf- +RISCV_GCC ?= $(RISCV_PREFIX)gcc +RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump +RISCV_GCC_OPTS ?= -g -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles $(RVTEST_DEFINES) + +COMPILE_CMD = $$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ + -I$(ROOTDIR)/riscv-test-suite/env/ \ + -I$(TARGETDIR)/$(RISCV_TARGET)/ \ + -T$(TARGETDIR)/$(RISCV_TARGET)/link.ld \ + $$(<) -o $$@ +OBJ_CMD = $$(RISCV_OBJDUMP) $$@ -D > $$@.objdump; \ + $$(RISCV_OBJDUMP) $$@ --source > $$@.debug + + +COMPILE_TARGET=\ + $(COMPILE_CMD); \ + if [ $$$$? -ne 0 ] ; \ + then \ + echo "\e[31m$$(RISCV_GCC) failed for target $$(@) \e[39m" ; \ + exit 1 ; \ + fi ; \ + $(OBJ_CMD); \ + if [ $$$$? -ne 0 ] ; \ + then \ + echo "\e[31m $$(RISCV_OBJDUMP) failed for target $$(@) \e[39m" ; \ + exit 1 ; \ + fi ; + diff --git a/arch_test_target/spike/device/rv32i_m/C/Makefile.include b/arch_test_target/spike/device/rv32i_m/C/Makefile.include index 7853bafe..346feaae 100644 --- a/arch_test_target/spike/device/rv32i_m/C/Makefile.include +++ b/arch_test_target/spike/device/rv32i_m/C/Makefile.include @@ -1,37 +1,4 @@ -TARGET_SIM ?= spike -TARGET_FLAGS ?= $(RISCV_TARGET_FLAGS) -ifeq ($(shell command -v $(TARGET_SIM) 2> /dev/null),) - $(error Target simulator executable '$(TARGET_SIM)` not found) -endif - -RISCV_PREFIX ?= riscv32-unknown-elf- -RISCV_GCC ?= $(RISCV_PREFIX)gcc -RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump -RISCV_GCC_OPTS ?= -g -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles $(RVTEST_DEFINES) - -COMPILE_CMD = $$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ - -I$(ROOTDIR)/riscv-test-suite/env/ \ - -I$(TARGETDIR)/$(RISCV_TARGET)/ \ - -T$(TARGETDIR)/$(RISCV_TARGET)/link.ld \ - $$(<) -o $$@ -OBJ_CMD = $$(RISCV_OBJDUMP) $$@ -D > $$@.objdump; \ - $$(RISCV_OBJDUMP) $$@ --source > $$@.debug - - -COMPILE_TARGET=\ - $(COMPILE_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m$$(RISCV_GCC) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; \ - $(OBJ_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m $$(RISCV_OBJDUMP) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; - +include $(TARGETDIR)/spike/device/Makefile_common.inc RUN_CMD = $(TARGET_SIM) $(TARGET_FLAGS) --isa=rv32ic \ +signature=$(*).signature.output +signature-granularity=4\ $< diff --git a/arch_test_target/spike/device/rv32i_m/F/Makefile.include b/arch_test_target/spike/device/rv32i_m/F/Makefile.include index b5030c5b..4fb87c62 100644 --- a/arch_test_target/spike/device/rv32i_m/F/Makefile.include +++ b/arch_test_target/spike/device/rv32i_m/F/Makefile.include @@ -1,37 +1,4 @@ -TARGET_SIM ?= spike -TARGET_FLAGS ?= $(RISCV_TARGET_FLAGS) -ifeq ($(shell command -v $(TARGET_SIM) 2> /dev/null),) - $(error Target simulator executable '$(TARGET_SIM)` not found) -endif - -RISCV_PREFIX ?= riscv32-unknown-elf- -RISCV_GCC ?= $(RISCV_PREFIX)gcc -RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump -RISCV_GCC_OPTS ?= -g -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles $(RVTEST_DEFINES) - -COMPILE_CMD = $$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ - -I$(ROOTDIR)/riscv-test-suite/env/ \ - -I$(TARGETDIR)/$(RISCV_TARGET)/ \ - -T$(TARGETDIR)/$(RISCV_TARGET)/link.ld \ - $$(<) -o $$@ -OBJ_CMD = $$(RISCV_OBJDUMP) $$@ -D > $$@.objdump; \ - $$(RISCV_OBJDUMP) $$@ --source > $$@.debug - - -COMPILE_TARGET=\ - $(COMPILE_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m$$(RISCV_GCC) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; \ - $(OBJ_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m $$(RISCV_OBJDUMP) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; - +include $(TARGETDIR)/spike/device/Makefile_common.inc RUN_CMD = $(TARGET_SIM) $(TARGET_FLAGS) --isa=rv32if \ +signature=$(*).signature.output +signature-granularity=4\ $< diff --git a/arch_test_target/spike/device/rv32i_m/I/Makefile.include b/arch_test_target/spike/device/rv32i_m/I/Makefile.include index 6c3693c5..740755c0 100644 --- a/arch_test_target/spike/device/rv32i_m/I/Makefile.include +++ b/arch_test_target/spike/device/rv32i_m/I/Makefile.include @@ -1,37 +1,4 @@ -TARGET_SIM ?= spike -TARGET_FLAGS ?= $(RISCV_TARGET_FLAGS) -ifeq ($(shell command -v $(TARGET_SIM) 2> /dev/null),) - $(error Target simulator executable '$(TARGET_SIM)` not found) -endif - -RISCV_PREFIX ?= riscv32-unknown-elf- -RISCV_GCC ?= $(RISCV_PREFIX)gcc -RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump -RISCV_GCC_OPTS ?= -g -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles $(RVTEST_DEFINES) - -COMPILE_CMD = $$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ - -I$(ROOTDIR)/riscv-test-suite/env/ \ - -I$(TARGETDIR)/$(RISCV_TARGET)/ \ - -T$(TARGETDIR)/$(RISCV_TARGET)/link.ld \ - $$(<) -o $$@ -OBJ_CMD = $$(RISCV_OBJDUMP) $$@ -D > $$@.objdump; \ - $$(RISCV_OBJDUMP) $$@ --source > $$@.debug - - -COMPILE_TARGET=\ - $(COMPILE_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m$$(RISCV_GCC) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; \ - $(OBJ_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m $$(RISCV_OBJDUMP) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; - +include $(TARGETDIR)/spike/device/Makefile_common.inc RUN_CMD = $(TARGET_SIM) $(TARGET_FLAGS) --isa=rv32i \ +signature=$(*).signature.output +signature-granularity=4\ $< diff --git a/arch_test_target/spike/device/rv32i_m/M/Makefile.include b/arch_test_target/spike/device/rv32i_m/M/Makefile.include index 2f1e83cb..5d8de47c 100644 --- a/arch_test_target/spike/device/rv32i_m/M/Makefile.include +++ b/arch_test_target/spike/device/rv32i_m/M/Makefile.include @@ -1,37 +1,4 @@ -TARGET_SIM ?= spike -TARGET_FLAGS ?= $(RISCV_TARGET_FLAGS) -ifeq ($(shell command -v $(TARGET_SIM) 2> /dev/null),) - $(error Target simulator executable '$(TARGET_SIM)` not found) -endif - -RISCV_PREFIX ?= riscv32-unknown-elf- -RISCV_GCC ?= $(RISCV_PREFIX)gcc -RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump -RISCV_GCC_OPTS ?= -g -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles $(RVTEST_DEFINES) - -COMPILE_CMD = $$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ - -I$(ROOTDIR)/riscv-test-suite/env/ \ - -I$(TARGETDIR)/$(RISCV_TARGET)/ \ - -T$(TARGETDIR)/$(RISCV_TARGET)/link.ld \ - $$(<) -o $$@ -OBJ_CMD = $$(RISCV_OBJDUMP) $$@ -D > $$@.objdump; \ - $$(RISCV_OBJDUMP) $$@ --source > $$@.debug - - -COMPILE_TARGET=\ - $(COMPILE_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m$$(RISCV_GCC) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; \ - $(OBJ_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m $$(RISCV_OBJDUMP) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; - +include $(TARGETDIR)/spike/device/Makefile_common.inc RUN_CMD = $(TARGET_SIM) $(TARGET_FLAGS) --isa=rv32im \ +signature=$(*).signature.output +signature-granularity=4\ $< diff --git a/arch_test_target/spike/device/rv32i_m/Zifencei/Makefile.include b/arch_test_target/spike/device/rv32i_m/Zifencei/Makefile.include index 6c3693c5..740755c0 100644 --- a/arch_test_target/spike/device/rv32i_m/Zifencei/Makefile.include +++ b/arch_test_target/spike/device/rv32i_m/Zifencei/Makefile.include @@ -1,37 +1,4 @@ -TARGET_SIM ?= spike -TARGET_FLAGS ?= $(RISCV_TARGET_FLAGS) -ifeq ($(shell command -v $(TARGET_SIM) 2> /dev/null),) - $(error Target simulator executable '$(TARGET_SIM)` not found) -endif - -RISCV_PREFIX ?= riscv32-unknown-elf- -RISCV_GCC ?= $(RISCV_PREFIX)gcc -RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump -RISCV_GCC_OPTS ?= -g -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles $(RVTEST_DEFINES) - -COMPILE_CMD = $$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ - -I$(ROOTDIR)/riscv-test-suite/env/ \ - -I$(TARGETDIR)/$(RISCV_TARGET)/ \ - -T$(TARGETDIR)/$(RISCV_TARGET)/link.ld \ - $$(<) -o $$@ -OBJ_CMD = $$(RISCV_OBJDUMP) $$@ -D > $$@.objdump; \ - $$(RISCV_OBJDUMP) $$@ --source > $$@.debug - - -COMPILE_TARGET=\ - $(COMPILE_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m$$(RISCV_GCC) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; \ - $(OBJ_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m $$(RISCV_OBJDUMP) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; - +include $(TARGETDIR)/spike/device/Makefile_common.inc RUN_CMD = $(TARGET_SIM) $(TARGET_FLAGS) --isa=rv32i \ +signature=$(*).signature.output +signature-granularity=4\ $< diff --git a/arch_test_target/spike/device/rv32i_m/privilege/Makefile.include b/arch_test_target/spike/device/rv32i_m/privilege/Makefile.include index 2d55242f..8275495d 100644 --- a/arch_test_target/spike/device/rv32i_m/privilege/Makefile.include +++ b/arch_test_target/spike/device/rv32i_m/privilege/Makefile.include @@ -1,37 +1,4 @@ -TARGET_SIM ?= spike -TARGET_FLAGS ?= $(RISCV_TARGET_FLAGS) -ifeq ($(shell command -v $(TARGET_SIM) 2> /dev/null),) - $(error Target simulator executable '$(TARGET_SIM)` not found) -endif - -RISCV_PREFIX ?= riscv32-unknown-elf- -RISCV_GCC ?= $(RISCV_PREFIX)gcc -RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump -RISCV_GCC_OPTS ?= -g -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles $(RVTEST_DEFINES) - -COMPILE_CMD = $$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ - -I$(ROOTDIR)/riscv-test-suite/env/ \ - -I$(TARGETDIR)/$(RISCV_TARGET)/ \ - -T$(TARGETDIR)/$(RISCV_TARGET)/link.ld \ - $$(<) -o $$@ -OBJ_CMD = $$(RISCV_OBJDUMP) $$@ -D > $$@.objdump; \ - $$(RISCV_OBJDUMP) $$@ --source > $$@.debug - - -COMPILE_TARGET=\ - $(COMPILE_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m$$(RISCV_GCC) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; \ - $(OBJ_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m $$(RISCV_OBJDUMP) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; - +include $(TARGETDIR)/spike/device/Makefile_common.inc RUN_CMD = $(TARGET_SIM) $(TARGET_FLAGS) --isa=rv32ic \ +signature=$(*).signature.output +signature-granularity=4\ $< diff --git a/arch_test_target/spike/device/rv64i_m/C/Makefile.include b/arch_test_target/spike/device/rv64i_m/C/Makefile.include index 4d957593..e6ca9fb3 100644 --- a/arch_test_target/spike/device/rv64i_m/C/Makefile.include +++ b/arch_test_target/spike/device/rv64i_m/C/Makefile.include @@ -1,37 +1,4 @@ -TARGET_SIM ?= spike -TARGET_FLAGS ?= $(RISCV_TARGET_FLAGS) -ifeq ($(shell command -v $(TARGET_SIM) 2> /dev/null),) - $(error Target simulator executable '$(TARGET_SIM)` not found) -endif - -RISCV_PREFIX ?= riscv64-unknown-elf- -RISCV_GCC ?= $(RISCV_PREFIX)gcc -RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump -RISCV_GCC_OPTS ?= -g -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles $(RVTEST_DEFINES) - -COMPILE_CMD = $$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ - -I$(ROOTDIR)/riscv-test-suite/env/ \ - -I$(TARGETDIR)/$(RISCV_TARGET)/ \ - -T$(TARGETDIR)/$(RISCV_TARGET)/link.ld \ - $$(<) -o $$@ -OBJ_CMD = $$(RISCV_OBJDUMP) $$@ -D > $$@.objdump; \ - $$(RISCV_OBJDUMP) $$@ --source > $$@.debug - - -COMPILE_TARGET=\ - $(COMPILE_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m$$(RISCV_GCC) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; \ - $(OBJ_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m $$(RISCV_OBJDUMP) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; - +include $(TARGETDIR)/spike/device/Makefile_common.inc RUN_CMD = $(TARGET_SIM) $(TARGET_FLAGS) --isa=rv64ic \ +signature=$(*).signature.output +signature-granularity=4\ $< diff --git a/arch_test_target/spike/device/rv64i_m/D/Makefile.include b/arch_test_target/spike/device/rv64i_m/D/Makefile.include index 7c72d03f..26113946 100644 --- a/arch_test_target/spike/device/rv64i_m/D/Makefile.include +++ b/arch_test_target/spike/device/rv64i_m/D/Makefile.include @@ -1,37 +1,4 @@ -TARGET_SIM ?= spike -TARGET_FLAGS ?= $(RISCV_TARGET_FLAGS) -ifeq ($(shell command -v $(TARGET_SIM) 2> /dev/null),) - $(error Target simulator executable '$(TARGET_SIM)` not found) -endif - -RISCV_PREFIX ?= riscv64-unknown-elf- -RISCV_GCC ?= $(RISCV_PREFIX)gcc -RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump -RISCV_GCC_OPTS ?= -g -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles $(RVTEST_DEFINES) - -COMPILE_CMD = $$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ - -I$(ROOTDIR)/riscv-test-suite/env/ \ - -I$(TARGETDIR)/$(RISCV_TARGET)/ \ - -T$(TARGETDIR)/$(RISCV_TARGET)/link.ld \ - $$(<) -o $$@ -OBJ_CMD = $$(RISCV_OBJDUMP) $$@ -D > $$@.objdump; \ - $$(RISCV_OBJDUMP) $$@ --source > $$@.debug - - -COMPILE_TARGET=\ - $(COMPILE_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m$$(RISCV_GCC) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; \ - $(OBJ_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m $$(RISCV_OBJDUMP) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; - +include $(TARGETDIR)/spike/device/Makefile_common.inc RUN_CMD = $(TARGET_SIM) $(TARGET_FLAGS) --isa=rv64ifd \ +signature=$(*).signature.output +signature-granularity=4\ $< diff --git a/arch_test_target/spike/device/rv64i_m/I/Makefile.include b/arch_test_target/spike/device/rv64i_m/I/Makefile.include index 20a1fdc1..2c763bf5 100644 --- a/arch_test_target/spike/device/rv64i_m/I/Makefile.include +++ b/arch_test_target/spike/device/rv64i_m/I/Makefile.include @@ -1,37 +1,4 @@ -TARGET_SIM ?= spike -TARGET_FLAGS ?= $(RISCV_TARGET_FLAGS) -ifeq ($(shell command -v $(TARGET_SIM) 2> /dev/null),) - $(error Target simulator executable '$(TARGET_SIM)` not found) -endif - -RISCV_PREFIX ?= riscv64-unknown-elf- -RISCV_GCC ?= $(RISCV_PREFIX)gcc -RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump -RISCV_GCC_OPTS ?= -g -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles $(RVTEST_DEFINES) - -COMPILE_CMD = $$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ - -I$(ROOTDIR)/riscv-test-suite/env/ \ - -I$(TARGETDIR)/$(RISCV_TARGET)/ \ - -T$(TARGETDIR)/$(RISCV_TARGET)/link.ld \ - $$(<) -o $$@ -OBJ_CMD = $$(RISCV_OBJDUMP) $$@ -D > $$@.objdump; \ - $$(RISCV_OBJDUMP) $$@ --source > $$@.debug - - -COMPILE_TARGET=\ - $(COMPILE_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m$$(RISCV_GCC) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; \ - $(OBJ_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m $$(RISCV_OBJDUMP) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; - +include $(TARGETDIR)/spike/device/Makefile_common.inc RUN_CMD = $(TARGET_SIM) $(TARGET_FLAGS) --isa=rv64i \ +signature=$(*).signature.output +signature-granularity=4\ $< diff --git a/arch_test_target/spike/device/rv64i_m/M/Makefile.include b/arch_test_target/spike/device/rv64i_m/M/Makefile.include index 0ae9f0af..8ce555c6 100644 --- a/arch_test_target/spike/device/rv64i_m/M/Makefile.include +++ b/arch_test_target/spike/device/rv64i_m/M/Makefile.include @@ -1,37 +1,4 @@ -TARGET_SIM ?= spike -TARGET_FLAGS ?= $(RISCV_TARGET_FLAGS) -ifeq ($(shell command -v $(TARGET_SIM) 2> /dev/null),) - $(error Target simulator executable '$(TARGET_SIM)` not found) -endif - -RISCV_PREFIX ?= riscv64-unknown-elf- -RISCV_GCC ?= $(RISCV_PREFIX)gcc -RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump -RISCV_GCC_OPTS ?= -g -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles $(RVTEST_DEFINES) - -COMPILE_CMD = $$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ - -I$(ROOTDIR)/riscv-test-suite/env/ \ - -I$(TARGETDIR)/$(RISCV_TARGET)/ \ - -T$(TARGETDIR)/$(RISCV_TARGET)/link.ld \ - $$(<) -o $$@ -OBJ_CMD = $$(RISCV_OBJDUMP) $$@ -D > $$@.objdump; \ - $$(RISCV_OBJDUMP) $$@ --source > $$@.debug - - -COMPILE_TARGET=\ - $(COMPILE_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m$$(RISCV_GCC) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; \ - $(OBJ_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m $$(RISCV_OBJDUMP) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; - +include $(TARGETDIR)/spike/device/Makefile_common.inc RUN_CMD = $(TARGET_SIM) $(TARGET_FLAGS) --isa=rv64im \ +signature=$(*).signature.output +signature-granularity=4\ $< diff --git a/arch_test_target/spike/device/rv64i_m/Zifencei/Makefile.include b/arch_test_target/spike/device/rv64i_m/Zifencei/Makefile.include index 61916a29..2c763bf5 100644 --- a/arch_test_target/spike/device/rv64i_m/Zifencei/Makefile.include +++ b/arch_test_target/spike/device/rv64i_m/Zifencei/Makefile.include @@ -1,38 +1,4 @@ -TARGET_SIM ?= spike -TARGET_FLAGS ?= $(RISCV_TARGET_FLAGS) -ifeq ($(shell command -v $(TARGET_SIM) 2> /dev/null),) - $(error Target simulator executable '$(TARGET_SIM)` not found) -endif - -RISCV_PREFIX ?= riscv64-unknown-elf- -RISCV_GCC ?= $(RISCV_PREFIX)gcc -RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump -RISCV_GCC_OPTS ?= -g -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles $(RVTEST_DEFINES) - -COMPILE_CMD = $$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ - -I$(ROOTDIR)/riscv-test-suite/env/ \ - -I$(TARGETDIR)/$(RISCV_TARGET)/ \ - -T$(TARGETDIR)/$(RISCV_TARGET)/link.ld \ - $$(<) -o $$@ -OBJ_CMD = $$(RISCV_OBJDUMP) $$@ -D > $$@.objdump; \ - $$(RISCV_OBJDUMP) $$@ --source > $$@.debug - - - -COMPILE_TARGET=\ - $(COMPILE_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m$$(RISCV_GCC) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; \ - $(OBJ_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m $$(RISCV_OBJDUMP) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; - +include $(TARGETDIR)/spike/device/Makefile_common.inc RUN_CMD = $(TARGET_SIM) $(TARGET_FLAGS) --isa=rv64i \ +signature=$(*).signature.output +signature-granularity=4\ $< diff --git a/arch_test_target/spike/device/rv64i_m/privilege/Makefile.include b/arch_test_target/spike/device/rv64i_m/privilege/Makefile.include index 80e4a690..5ef2802f 100644 --- a/arch_test_target/spike/device/rv64i_m/privilege/Makefile.include +++ b/arch_test_target/spike/device/rv64i_m/privilege/Makefile.include @@ -1,37 +1,4 @@ -TARGET_SIM ?= spike -TARGET_FLAGS ?= $(RISCV_TARGET_FLAGS) -ifeq ($(shell command -v $(TARGET_SIM) 2> /dev/null),) - $(error Target simulator executable '$(TARGET_SIM)` not found) -endif - -RISCV_PREFIX ?= riscv64-unknown-elf- -RISCV_GCC ?= $(RISCV_PREFIX)gcc -RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump -RISCV_GCC_OPTS ?= -g -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles $(RVTEST_DEFINES) - -COMPILE_CMD = $$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ - -I$(ROOTDIR)/riscv-test-suite/env/ \ - -I$(TARGETDIR)/$(RISCV_TARGET)/ \ - -T$(TARGETDIR)/$(RISCV_TARGET)/link.ld \ - $$(<) -o $$@ -OBJ_CMD = $$(RISCV_OBJDUMP) $$@ -D > $$@.objdump; \ - $$(RISCV_OBJDUMP) $$@ --source > $$@.debug - - -COMPILE_TARGET=\ - $(COMPILE_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m$$(RISCV_GCC) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; \ - $(OBJ_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m $$(RISCV_OBJDUMP) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; - +include $(TARGETDIR)/spike/device/Makefile_common.inc RUN_CMD = $(TARGET_SIM) $(TARGET_FLAGS) --isa=rv64ic \ +signature=$(*).signature.output +signature-granularity=4\ $<