From 649faca27ef0229f7844a4680290693674d775b3 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sat, 9 Apr 2016 13:25:29 +0200 Subject: [PATCH] Work-around for c.addi16sp zero-imm gas bug (for torture test) --- scripts/torture/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/torture/Makefile b/scripts/torture/Makefile index 6fb3bcd..90dbc24 100644 --- a/scripts/torture/Makefile +++ b/scripts/torture/Makefile @@ -31,14 +31,16 @@ tests/testbench.vvp: testbench.v ../../picorv32.v iverilog -o tests/testbench.vvp testbench.v ../../picorv32.v tests/generated.ok: riscv-torture/build.ok + mkdir -p tests rm -f riscv-torture/output/test_* cd riscv-torture && ./sbt 'generator/run -n 1000' + sed -i -e '/addi x2, x2, 0/ s/addi/xori/;' riscv-torture/output/test_*.S touch tests/generated.ok define test_template tests/test_$(1).S: tests/generated.ok - mkdir -p tests mv riscv-torture/output/test_$(1).S tests/ + touch tests/test_$(1).S tests/test_$(1).elf: tests/test_$(1).S riscv32-unknown-elf-gcc -m32 -march=RV32IC -ffreestanding -nostdlib -Wl,-Bstatic,-T,sections.lds -I. -o tests/test_$(1).elf tests/test_$(1).S