From ae7a71c0f4a167f4912e7ec802c502045a335ca7 Mon Sep 17 00:00:00 2001 From: Ross Thompson Date: Sat, 22 Oct 2022 16:29:12 -0500 Subject: [PATCH] Created one off test to replicate the floating point forwarding hazard bug. --- pipelined/testbench/tests.vh | 13 +++++++------ tests/testsBP/crt0/Makefile | 1 + tests/testsBP/james_mm/Makefile | 1 + tests/testsBP/makefile.inc | 5 ++--- tests/testsBP/mibench_qsort/Makefile | 1 + tests/testsBP/sieve/Makefile | 1 + tests/testsBP/simple/Makefile | 1 + 7 files changed, 14 insertions(+), 9 deletions(-) diff --git a/pipelined/testbench/tests.vh b/pipelined/testbench/tests.vh index b6c7c790..91d3dcf1 100644 --- a/pipelined/testbench/tests.vh +++ b/pipelined/testbench/tests.vh @@ -874,12 +874,13 @@ string imperas32f[] = '{ string testsBP64[] = '{ `IMPERASTEST, - "rv64BP/simple", - "rv64BP/mmm", - "rv64BP/linpack_bench", - "rv64BP/sieve", - "rv64BP/qsort", - "rv64BP/dhrystone" + "rv64BP/floating-point-bug", + "rv64BP/simple" +// "rv64BP/mmm", +// "rv64BP/linpack_bench", +// "rv64BP/sieve", +// "rv64BP/qsort", +// "rv64BP/dhrystone" }; string imperas32p[] = '{ diff --git a/tests/testsBP/crt0/Makefile b/tests/testsBP/crt0/Makefile index 2af43a40..0b6a3af2 100644 --- a/tests/testsBP/crt0/Makefile +++ b/tests/testsBP/crt0/Makefile @@ -7,6 +7,7 @@ LIBRARY_FILES := MARCH :=-march=rv64imfdc MABI :=-mabi=lp64d LINK_FLAGS :=$(MARCH) $(MABI) -nostartfiles +LINKER := ${ROOT}/linker.x AFLAGS =$(MARCH) $(MABI) -W CFLAGS =$(MARCH) $(MABI) -mcmodel=medany -O2 diff --git a/tests/testsBP/james_mm/Makefile b/tests/testsBP/james_mm/Makefile index 9c5c1cdd..d13a3ad8 100644 --- a/tests/testsBP/james_mm/Makefile +++ b/tests/testsBP/james_mm/Makefile @@ -7,6 +7,7 @@ LIBRARY_FILES := crt0 MARCH :=-march=rv64imfdc MABI :=-mabi=lp64d LINK_FLAGS :=$(MARCH) $(MABI) -nostartfiles -Wl,-Map=$(TARGET).map +LINKER := ${ROOT}/linker8000-0000.x CFLAGS =$(MARCH) $(MABI) -Wa,-alhs -Wa,-L -mcmodel=medany -mstrict-align -O2 diff --git a/tests/testsBP/makefile.inc b/tests/testsBP/makefile.inc index 3fafbf01..961311a7 100644 --- a/tests/testsBP/makefile.inc +++ b/tests/testsBP/makefile.inc @@ -7,8 +7,7 @@ OBJEXT := o DEPEXT := d SRCDIR := . BUILDDIR := OBJ -LINKER := ${ROOT}/linker.x - +WIDTH := 64 SOURCES ?= $(shell find $(SRCDIR) -type f -regex ".*\.$(SRCEXT)" | sort) OBJECTS := $(SOURCES:.$(CEXT)=.$(OBJEXT)) OBJECTS := $(OBJECTS:.$(AEXT)=.$(OBJEXT)) @@ -88,7 +87,7 @@ $(TARGET).memfile: $(TARGET) @echo 'Making object dump file.' @riscv64-unknown-elf-objdump -D $< > $<.objdump @echo 'Making memory file' - exe2memfile0.pl $< + riscv64-unknown-elf-elf2hex --bit-width $(WIDTH) --input $< --output $@ extractFunctionRadix.sh $<.objdump mkdir -p ../../imperas-riscv-tests/work/rv64BP/ cp -f $(TARGETDIR)/* ../../imperas-riscv-tests/work/rv64BP/ diff --git a/tests/testsBP/mibench_qsort/Makefile b/tests/testsBP/mibench_qsort/Makefile index b1cf7b67..a738265d 100644 --- a/tests/testsBP/mibench_qsort/Makefile +++ b/tests/testsBP/mibench_qsort/Makefile @@ -7,6 +7,7 @@ LIBRARY_FILES := crt0 MARCH :=-march=rv64ic MABI :=-mabi=lp64 LINK_FLAGS :=$(MARCH) $(MABI) -nostartfiles -Wl,-Map=$(TARGET).map +LINKER := ${ROOT}/linker8000-0000.x CFLAGS =$(MARCH) $(MABI) -Wa,-alhs -Wa,-L -mcmodel=medany -mstrict-align -O2 diff --git a/tests/testsBP/sieve/Makefile b/tests/testsBP/sieve/Makefile index 9c884f48..c000b04e 100644 --- a/tests/testsBP/sieve/Makefile +++ b/tests/testsBP/sieve/Makefile @@ -7,6 +7,7 @@ LIBRARY_FILES := crt0 MARCH :=-march=rv64ic MABI :=-mabi=lp64 LINK_FLAGS :=$(MARCH) $(MABI) -nostartfiles -Wl,-Map=$(TARGET).map +LINKER := ${ROOT}/linker8000-0000.x CFLAGS =$(MARCH) $(MABI) -Wa,-alhs -Wa,-L -mcmodel=medany -mstrict-align -O2 diff --git a/tests/testsBP/simple/Makefile b/tests/testsBP/simple/Makefile index 66a8d7f1..f85aedd5 100644 --- a/tests/testsBP/simple/Makefile +++ b/tests/testsBP/simple/Makefile @@ -6,6 +6,7 @@ LIBRARY_FILES := crt0 MARCH :=-march=rv64imfdc MABI :=-mabi=lp64d +LINKER := ${ROOT}/linker8000-0000.x LINK_FLAGS :=$(MARCH) $(MABI) -nostartfiles -Wl,-Map=$(TARGET).map CFLAGS =$(MARCH) $(MABI) -Wa,-alhs -Wa,-L -mcmodel=medany -mstrict-align -O2