aboutsummaryrefslogtreecommitdiff
path: root/arch_test_target
diff options
context:
space:
mode:
authorNeel Gala <neelgala@incoresemi.com>2022-02-26 09:17:49 +0530
committerNeel Gala <neelgala@incoresemi.com>2022-02-26 09:17:49 +0530
commit95615360d248639d0155d4a41621d147425cd0b1 (patch)
treefb51ea26d8f5d7dea2eea08a03d52acc4bf69afc /arch_test_target
parente78559f521c1cae445e02ec5cd43db15bb32d51e (diff)
downloadspike-95615360d248639d0155d4a41621d147425cd0b1.zip
spike-95615360d248639d0155d4a41621d147425cd0b1.tar.gz
spike-95615360d248639d0155d4a41621d147425cd0b1.tar.bz2
clean up for rv32e_unratified.
Diffstat (limited to 'arch_test_target')
-rw-r--r--arch_test_target/spike/device/rv32e_unratified/C/Makefile.include35
-rw-r--r--arch_test_target/spike/device/rv32e_unratified/E/Makefile.include35
-rw-r--r--arch_test_target/spike/device/rv32e_unratified/M/Makefile.include35
3 files changed, 3 insertions, 102 deletions
diff --git a/arch_test_target/spike/device/rv32e_unratified/C/Makefile.include b/arch_test_target/spike/device/rv32e_unratified/C/Makefile.include
index 7aad017..daf0f43 100644
--- a/arch_test_target/spike/device/rv32e_unratified/C/Makefile.include
+++ b/arch_test_target/spike/device/rv32e_unratified/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=rv32ec \
+signature=$(*).signature.output +signature-granularity=4\
$<
diff --git a/arch_test_target/spike/device/rv32e_unratified/E/Makefile.include b/arch_test_target/spike/device/rv32e_unratified/E/Makefile.include
index 86b32e2..548b17d 100644
--- a/arch_test_target/spike/device/rv32e_unratified/E/Makefile.include
+++ b/arch_test_target/spike/device/rv32e_unratified/E/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=rv32e \
+signature=$(*).signature.output +signature-granularity=4\
$<
diff --git a/arch_test_target/spike/device/rv32e_unratified/M/Makefile.include b/arch_test_target/spike/device/rv32e_unratified/M/Makefile.include
index 141974d..749c7fc 100644
--- a/arch_test_target/spike/device/rv32e_unratified/M/Makefile.include
+++ b/arch_test_target/spike/device/rv32e_unratified/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=rv32em \
+signature=$(*).signature.output +signature-granularity=4\
$<