diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2016-09-09 18:25:10 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2016-09-09 18:25:23 -0700 |
commit | 8006d004a59618ce455c4365c09e138b06ca7b70 (patch) | |
tree | 23fccd958c861a8a7dce215d3b287b4b6a87e39f /machine | |
parent | 4a6b20595a77a0d3e4e507563232a55ff74febf0 (diff) | |
download | riscv-pk-8006d004a59618ce455c4365c09e138b06ca7b70.zip riscv-pk-8006d004a59618ce455c4365c09e138b06ca7b70.tar.gz riscv-pk-8006d004a59618ce455c4365c09e138b06ca7b70.tar.bz2 |
Attempt to disable FPU if using no-FPU pk/bbl
Diffstat (limited to 'machine')
-rw-r--r-- | machine/minit.c | 5 |
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 } |