ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 1,823 microarchs · 16,083 chips · 105 sources
Arch:
Tier:

frm

T1 riscv register register
Floating-Point Dynamic Rounding Mode
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRISC-V Privileged (F)
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
PrivilegeU
ExtensionsF

Summary

Rounding modes are encoded as follows:

Syntax / Encoding

CSR 0x002 (U-mode, RW)

Bitfields (1)

BitsFieldDescription
2:0ROUNDINGMODERounding mode data.

Reference Notes

Rounding modes are encoded as follows:

[[rm]]
.Rounding mode encoding.
[%autowidth,float="center",align="center",cols="^,^,<",options="header"]
!===
!Rounding Mode |Mnemonic |Meaning
!000 !RNE !Round to Nearest, ties to Even
!001 !RTZ !Round towards Zero
!010 !RDN !Round Down (towards latexmath:[$-\infty$])
!011 !RUP !Round Up (towards latexmath:[$+\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).