Fix bit-width of memfile for rv64 riscv-arch-test floating point tests

This commit is contained in:
Jordan Carlin 2024-09-29 17:24:08 -07:00
parent 8a58f9556e
commit 4092f27b07
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View File

@ -25,7 +25,7 @@ config%.ini: config.ini
# Generate riscv-arch-test targets
arch%: config$$*.ini | $(work_dir) $(arch_workdir)
riscof run --work-dir=$(work_dir)/$@ --config=$< --suite=$(arch_dir)/riscv-test-suite/ --env=$(arch_dir)/riscv-test-suite/env --no-browser
$(MAKE) -f makefile-memfile WORKDIR=$(work_dir)/$@
$(MAKE) -f makefile-memfile WORKDIR=$(work_dir)/$@ BITWIDTH=$(patsubst %32e,%32,$*)
rsync -a $(work_dir)/$@/rv*/* $(arch_workdir)/rv$(patsubst %64,%64i,$(patsubst %32,%32i,$*))_m || echo "error suppressed"
# Generate wally-riscv-arch-test targets

View File

@ -16,8 +16,9 @@ wally-sim-files: $(MEMFILES) $(ADDRFILES)
# because elf2hex requires a bit width we use findstring to figure out if the compiled directory
# is XLEN=64 or 32. This is hacky and will likely break in the future.
# the .addr is a separate target so make can split into more jobs and more parallism.
%.elf.memfile: BITWIDTH ?= $(if $(findstring rv64,$*),64,32)
%.elf.memfile: %.elf
riscv64-unknown-elf-elf2hex --bit-width $(if $(findstring rv64,$*),64,32) --input $< --output $@
riscv64-unknown-elf-elf2hex --bit-width $(BITWIDTH) --input $< --output $@
%.elf.objdump.addr: %.elf.objdump
extractFunctionRadix.sh $<