Webcentive RISC-V Reference

frm

Floating-Point Dynamic Rounding Mode

Address
0x002
Group
Unprivileged and user-level CSRs
Privilege
URW (privileged spec CSR listing, Unprivileged Floating-Point CSRs)
Access
read/write; lowest privilege U (user/unprivileged)
Address range
Standard read/write
Name in riscv-unified-db
Floating-Point Dynamic Rounding Mode

Privileged spec: Floating-Point Dynamic Rounding Mode

Description

Rounding modes are encoded as follows:

Rounding mode encoding.

Rounding Mode |Mnemonic |Meaning
000RNERound to Nearest, ties to Even
001RTZRound towards Zero
010RDNRound Down (towards $-\infty$)
011RUPRound Up (towards $+\infty$)
100RMMRound to Nearest, ties to Max Magnitude
101Reserved for future use.
110Reserved for future use.
111DYNIn 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).

From riscv-unified-db, reformatted.

Fields

FieldBitsTypeDescription
ROUNDINGMODE2-0RW-H

Rounding mode data.

Fields from riscv-unified-db; field types computed by IDL functions there are not shown.

Specification and related pages