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
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));