aboutsummaryrefslogtreecommitdiff
path: root/machine
diff options
context:
space:
mode:
Diffstat (limited to 'machine')
-rw-r--r--machine/minit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/machine/minit.c b/machine/minit.c
index 5aae387..33a1e3b 100644
--- a/machine/minit.c
+++ b/machine/minit.c
@@ -61,8 +61,9 @@ static void fp_init()
init_fp_reg(i);
write_csr(fcsr, 0);
#else
- if (supports_extension('D'))
- die("FPU unexpectedly found; recompile with -mhard-float");
+ uintptr_t fd_mask = (1 << ('F' - 'A')) | (1 << ('D' - 'A'));
+ clear_csr(misa, fd_mask);
+ assert(!(read_csr(misa) & fd_mask));
#endif
}