Does C.LW zero-extend on RV64?
No; like LW, it sign-extends the loaded 32-bit word to XLEN.
Load a 32-bit word, sign-extend it to XLEN, and write rd'. CL format.
C.LW (CL format, with rd' and rs1' limited to x8-x15) loads a 32-bit word from rs1' plus a zero-extended, 4-byte-scaled offset, sign-extends it to XLEN, and writes rd'. It expands to lw rd', offset(rs1'); the offset range is 0 through 124 bytes.
This interactive model shows only architectural decode, operands, and state changes, not a pipeline, cache, or timing model.
The address is naturally aligned; this example assumes the EEI permits access.
Awaiting state update: the highlighted fields and calculation above show the current step; no architectural result has been committed yet.
C.LW uses CL format: rs1' plus a zero-extended, 4-byte-scaled offset forms the address, and the loaded word is sign-extended to XLEN.
Understand this scenario with real code like «c.lw x8, 0(x10)».
No; like LW, it sign-extends the loaded 32-bit word to XLEN.