F Instructions
30 RISC-V instructions in this extension - click any row for encoding, pseudocode, and full documentation.
| Mnemonic | Syntax | Format | Summary |
|---|---|---|---|
| FADD.S | FADD.S rd, rs1, rs2 | R-Type | Performs single-precision floating-point addition. |
| FCLASS.S | FCLASS.S rd, rs1 | R-Type | Examines the value in a float register and generates a 10-bit bitmask indicating its class (NaN, Inf, Zero, Normal, etc.). |
| FCVT.L.S | FCVT.L.S rd, rs1 | I-Type (Float) | Converts a single-precision float to a 64-bit signed integer. |
| FCVT.LU.S | FCVT.LU.S rd, rs1 | I-Type (Float) | Converts a single-precision float to a 64-bit unsigned integer. |
| FCVT.S.L | FCVT.S.L rd, rs1 | I-Type (Float) | Converts a 64-bit signed integer (Long) to a single-precision float. |
| FCVT.S.LU | FCVT.S.LU rd, rs1 | I-Type (Float) | Converts a 64-bit unsigned integer to a single-precision float. |
| FCVT.S.W | FCVT.S.W rd, rs1 | I-Type (Float) | Converts a signed 32-bit integer to a single-precision floating-point number. |
| FCVT.S.WU | FCVT.S.WU rd, rs1 | I-Type (Float) | Converts a 32-bit unsigned integer to a single-precision float. |
| FCVT.W.S | FCVT.W.S rd, rs1 | I-Type (Float) | Converts a single-precision floating-point number to a signed 32-bit integer. |
| FCVT.WU.S | FCVT.WU.S rd, rs1 | I-Type (Float) | Converts a single-precision float to a 32-bit unsigned integer. |
| FDIV.S | FDIV.S rd, rs1, rs2 | R-Type | Performs single-precision floating-point division. |
| FEQ.S | FEQ.S rd, rs1, rs2 | R-Type | Sets integer rd to 1 if float rs1 equals float rs2, else 0. |
| FLE.S | FLE.S rd, rs1, rs2 | R-Type | Sets integer rd to 1 if float rs1 is less than or equal to float rs2, else 0. |
| FLT.S | FLT.S rd, rs1, rs2 | R-Type | Sets integer rd to 1 if float rs1 is less than float rs2, else 0. |
| FLW | FLW rd, offset(rs1) | I-Type | Loads a single-precision floating-point value from memory. |
| FMADD.S | FMADD.S rd, rs1, rs2, rs3 | R4-Type | Computes (rs1 * rs2) + rs3 with a single rounding. |
| FMAX.S | FMAX.S rd, rs1, rs2 | R-Type | Writes the larger of two single-precision floating-point values to rd. |
| FMIN.S | FMIN.S rd, rs1, rs2 | R-Type | Writes the smaller of two single-precision floating-point values to rd. |
| FMSUB.S | FMSUB.S rd, rs1, rs2, rs3 | R4-Type | Computes (rs1 * rs2) - rs3 with a single rounding. |
| FMUL.S | FMUL.S rd, rs1, rs2 | R-Type | Performs single-precision floating-point multiplication. |
| FMV.W.X | FMV.W.X rd, rs1 | I-Type (Float) | Moves the bit pattern of an integer register to a floating-point register. |
| FMV.X.W | FMV.X.W rd, rs1 | I-Type (Float) | Moves the bit pattern of a floating-point register to an integer register. |
| FNMADD.S | FNMADD.S rd, rs1, rs2, rs3 | R4-Type | Computes -(rs1 * rs2) - rs3 with a single rounding. |
| FNMSUB.S | FNMSUB.S rd, rs1, rs2, rs3 | R4-Type | Computes -(rs1 * rs2) + rs3 with a single rounding. |
| FSGNJ.S | FSGNJ.S rd, rs1, rs2 | R-Type | Injects the sign of rs2 into rs1. Used to copy values or manipulate signs. |
| FSGNJN.S | FSGNJN.S rd, rs1, rs2 | R-Type | Injects the *negated* sign of rs2 into rs1. Used for negation and absolute value. |
| FSGNJX.S | FSGNJX.S rd, rs1, rs2 | R-Type | Injects the XOR of signs of rs1 and rs2. Used to copy sign. |
| FSQRT.S | FSQRT.S rd, rs1 | I-Type (Float) | Computes the square root of a single-precision floating-point number. |
| FSUB.S | FSUB.S rd, rs1, rs2 | R-Type | Performs single-precision floating-point subtraction. |
| FSW | FSW rs2, offset(rs1) | S-Type | Stores a single-precision floating-point value to memory. |