Fix benchmark compilation/execution on RV32
authorAndrew Waterman <waterman@cs.berkeley.edu>
Tue, 21 Apr 2015 21:57:42 +0000 (14:57 -0700)
committerAndrew Waterman <waterman@cs.berkeley.edu>
Tue, 21 Apr 2015 21:57:42 +0000 (14:57 -0700)
benchmarks/Makefile
benchmarks/common/syscalls.c

index 23ce02da0e9e73657d61d9fff029615ac6fa5333..3cb899a665a8895b0655acb396c93fce3438788c 100644 (file)
@@ -55,7 +55,7 @@ RISCV_GCC = $(RISCV_PREFIX)gcc
 RISCV_GCC_OPTS = -static -Wa,-march=RVIMAFDXhwacha -std=gnu99 -O2 -ffast-math
 RISCV_LINK = $(RISCV_GCC) -T $(bmarkdir)/common/test.ld $(incs)
 RISCV_LINK_MT = $(RISCV_GCC) -T $(bmarkdir)/common/test-mt.ld
-RISCV_LINK_OPTS = -nostdlib -nostartfiles -ffast-math -lc
+RISCV_LINK_OPTS = -nostdlib -nostartfiles -ffast-math -lc -lgcc
 RISCV_OBJDUMP = $(RISCV_PREFIX)objdump --disassemble-all --disassemble-zeroes --section=.text --section=.text.startup --section=.data
 RISCV_SIM = spike
 
index b1c100dd10ce0830bc4ac68c921cd397f8bfd316..4c494f1b253807ee2fe36a0dcce9661d2aed3126 100644 (file)
@@ -66,7 +66,7 @@ static void tohost_exit(int code)
   while (1);
 }
 
-long handle_trap(long cause, long epc, long regs[32])
+long handle_trap(long cause, long epc, long long regs[32])
 {
   int* csr_insn;
   asm ("jal %0, 1f; csrr a0, stats; 1:" : "=r"(csr_insn));