Disable RISC-V FPU by default

This commit is contained in:
Zejun Zhao 2025-03-25 23:43:01 +08:00 committed by Tate, Hongliang Tian
parent 14b8c48859
commit 5630fa8b36

View File

@ -64,6 +64,8 @@ pub fn read_random() -> Option<u64> {
pub(crate) fn enable_cpu_features() { pub(crate) fn enable_cpu_features() {
unsafe { unsafe {
riscv::register::sstatus::set_fs(riscv::register::sstatus::FS::Clean); // We adopt a lazy approach to enable the floating-point unit; it's not
// enabled before the first FPU trap.
riscv::register::sstatus::set_fs(riscv::register::sstatus::FS::Off);
} }
} }