Function core::arch::riscv64::frcsr

source ·
pub fn frcsr() -> u32
🔬This is a nightly-only experimental API. (stdsimd #48556)
Available on RISC-V RV64 only.
Expand description

读取浮点控制和状态寄存器 fcsr

寄存器 fcsr 是一个 32 位的读写寄存器,它为浮点算术运算选择动态舍入模式并保存应计异常标志。

根据 “F” Standard Extension for Single-Precision Floating-Point, Version 2.2,寄存器 fcsr 定义为:

Bit indexMeaning
0..=4Accrued Exceptions (fflags)
5..=7Rounding Mode (frm)
8..=31Reserved

有关每个字段的定义,请访问 frrmfrflags