fcvtmod.w.d
Floating-Point Convert Double-Precision to Word with Modulo
Encoding
| 3127 | 2625 | 2420 | 1915 | 1412 | 117 | 62 | 10 | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 11000 | 01 | 01000 | rs1 | 001 | rd | 10100 | 11 | ||||||||||||||||||||||||
Match 0xc2801053, mask 0xfff0707f. Source: fcvtmod.w.d rd rs1 24..20=8 31..27=0x18 14..12=1 26..25=1 6..2=0x14 1..0=3 in riscv-opcodes/extensions/rv_d_zfa.
| Field | Bits | riscv-opcodes name |
|---|---|---|
| rs1 | 19:15 | rs1 |
| rd | 11:7 | rd |
Description
The fcvtmod.w.d instruction always rounds towards zero. Bits 31:0 are taken from the rounded, unbounded
two's complement result, then sign-extended to XLEN bits and written to integer register xd. ±∞ and
NaN are converted to zero.
Floating-point exception flags are raised the same as they would be for fcvt.w.d with the same input
operand.
This instruction is only provided if the D extension is implemented. It is encoded like fcvt.w.d, but
with the xs2 field set to 8 and the rm field set to 1 (RTZ). Other rm values are reserved.
Description from riscv-unified-db, reformatted.