frm
Floating-Point Dynamic Rounding Mode
Rounding modes are encoded as follows:
| !Rounding Mode | Mnemonic | Meaning !000 !RNE !Round to Nearest, ties to Even !001 !RTZ !Round towards Zero !010 !RDN !Round Down (towards ) !011 !RUP !Round Up (towards ) !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
ROUNDINGMODE
- Location
-
frm[2:0] - Description
-
Rounding mode data.
- Type
RW-H |
Read-Write with Hardware update Field is writable by software. Any value that fits in the field is acceptable. Hardware also updates the field without an explicit software write. |
- Reset value
-
UNDEFINED_LEGAL
- Software write
-
This field has special behavior when written by software (e.g., through csrrw).
When software tries to write
csr_value, the field will be written with the return value of the function below.