fmin.s
riscv_unified_db)RV32 / RV64 (Ratified & Standard Extensions)
main
userFSummary
The fmin.s instruction writes smaller of fs1 and fs2 to fd. For the purposes of this instruction, the value -0.0 is considered to be less than the value +0.0. If both inputs are NaNs, the result is the canonical NaN. If only one operand is a NaN, the result is the non-NaN operand. Signaling NaN inputs set the invalid operation exception flag, even when the result is not NaN.
Syntax / Encoding
fmin.s fd, fs1, fs2 | 0010100xxxxxxxxxx000xxxxx1010011 (mask=0xfe00707f match=0x28000053)
Binary Encodings (1)
| Width | Format | Bit Pattern | Mask / Match |
|---|---|---|---|
| 32 | RV | 0010100xxxxxxxxxx000xxxxx1010011 | 0xfe00707f / 0x28000053 |
Operands
| Name | Description |
|---|---|
fs2 | bits [24:20] |
fs1 | bits [19:15] |
fd | bits [11:7] |
Reference Notes
The `fmin.s` instruction writes smaller of `fs1` and `fs2` to `fd`. For the purposes of this instruction, the value `-0.0` is considered to be less than the value `+0.0`. If both inputs are NaNs, the result is the canonical NaN. If only one operand is a NaN, the result is the non-NaN operand. Signaling NaN inputs set the invalid operation exception flag, even when the result is not NaN. [NOTE] ==== Note that in version 2.2 of the F extension, the `fmin.s` and `fmax.s` instructions were amended to implement the proposed _IEEE 754-201x_ `minimumNumber` and `maximumNumber` operations, rather than the _IEEE 754-2008_ _minNum_ and _maxNum_ operations. These operations differ in their handling of signaling NaNs. ====