C.FLW

RISC-V C.FLW Instruction Details

Instruction ManualC-type

Load SP FP from memory into fd'. CL format, RV32FC.

Instruction Syntax

c.flw fd', offset(rs1')
Operand Breakdown
Compressed instructions are 16 bits; registers are often limited to x8–x15.
Immediate fields are narrower. Refer to the full encoding for this compressed instruction.
CFCompressed Instruction

Instruction Behavior

c.flw in RV32FC, loads a 32-bit single-precision value from rs1' plus a zero-extended offset scaled by 4 into fd'.

Quick Understanding & Search Notes

c.flw in RV32FC, loads a 32-bit single-precision value from rs1' plus a zero-extended offset scaled by 4 into fd'.

This is a real 16-bit C-extension memory encoding with semantics corresponding to the FLD/FLW/FSD/FSW floating-point load/store family.
C.FLW is defined only for RV32C; RV64C uses the same encoding space for C.LD.
The offset is zero-extended and scaled by access width in the encoding; it is not an arbitrary byte immediate.

Common Usage Scenarios

Compressed & Code Size

Understand this scenario with real code like «c.flw f8, 0(x10)».

Pre-Use Checklist

Syntax Check
  • Confirm the current instruction format is C-type.
  • Confirm the operand order matches the example.
Semantic Check
  • Ensure the destination register usage is compatible with the calling convention.
  • Confirm this is not the lower-level form of a pseudo-instruction expansion.

Pitfalls / Common Confusions

C.FLW is defined only for RV32C; RV64C uses the same encoding space for C.LD.
The offset is zero-extended and scaled by access width in the encoding; it is not an arbitrary byte immediate.

FAQ

What is the offset unit for c.flw?

The encoded immediate is scaled by access width: 8 bytes for double-precision and 4 bytes for single-precision.

Does c.flw require a floating-point extension?

Yes. Double-precision forms require D, single-precision forms require F, and all require C.