← Home

frm

Floating-Point Dynamic Rounding Mode

Address: 0x002 (2) · Privilege: U · Length: 32 · Writable · Defined by: F

Rounding modes are encoded as follows:

.Rounding mode encoding. !Rounding Mode |Mnemonic |Meaning !000 !RNE !Round to Nearest, ties to Even !001 !RTZ !Round towards Zero !010 !RDN !Round Down (towards $-\infty$) !011 !RUP !Round Up (towards $+\infty$) !100 !RMM !Round to Nearest, ties to Max Magnitude !101 ! !_Reserved for future use._ !110 ! !_Reserved for future use._ !111 !DYN !In instruction's _rm_ field, selects dynamic rounding mode; In Rounding Mode register, _reserved_.

The behavior of floating-point instructions that depend on rounding mode when executed with a reserved rounding mode is _reserved_, including both static reserved rounding modes (101-110) and dynamic reserved rounding modes (101-111).

Some instructions, including widening conversions, have the _rm_ field but are nevertheless mathematically unaffected by the rounding mode; software should set their _rm_ field to RNE (000) but implementations must treat the _rm_ field as usual (in particular, with regard to decoding legal vs. reserved encodings).

Fields

31:2423:1615:87:0
—ROUNDINGMODE
BitsFieldAliasDescriptionTypeReset
[2:0]ROUNDINGMODEfcsr.FRMRounding mode data.RW-HUNDEFINED_LEGAL

Software read

return
 CSR[fcsr].FRM;

Version af3eaf9+cheriot.f635218

Data from the RISC-V Unified Database, copyright RISC-V International and contributors.

CHERIoT extensions from the CHERIoT specification and Sail model, copyright Microsoft and the CHERIoT Platform contributors.

This site is provided as a community resource and is NOT affiliated with nor endorsed by RISC-V International.