#include "encoding.h"
-#ifdef __riscv64
+#if __riscv_xlen == 64
# define LREG ld
# define SREG sd
# define REGBYTES 8
# make sure XLEN agrees with compilation choice
csrr t0, misa
-#ifdef __riscv64
+#if __riscv_xlen == 64
bltz t0, 1f
#else
bgez t0, 1f
j tohost_exit
1:
-#ifdef __riscv_hard_float
+#ifdef __riscv_flen
# initialize FPU if we have one
andi t0, t0, 1 << ('f' - 'a')
beqz t0, 1f
j _init
+ .align 2
trap_entry:
addi sp, sp, -272