Does ZEXT.H access memory?
No. It only reads and writes integer registers; any memory access must be performed by a separate load or store instruction.
Zero-extend halfword
ZEXT-H uses opcode 0110011 (0x33) in RV32 and opcode 0111011 (0x3b) in RV64, funct3 100, funct7 0000100, rs2 0. The rs1 and rs2 fields select the two source registers, and rd selects the destination register.
Zero-extends the least-significant 16 bits of rs to XLEN. It is a Zbb instruction with different encodings in RV32 and RV64.
Starts with machine-code field decoding, then shows operand reads, instruction-specific execution, and ISA-visible state update.
The machine code is split by the current instruction format; the animation starts from encoding/decode.
This animation shows ISA-visible decode and state changes, not any specific CPU pipeline, cache, prediction, or timing implementation.
ZEXT.H is a Zbb instruction: it reads rs[15:0] and zero-extends that value to XLEN. RV32 and RV64 use different encodings.
Understand this scenario with real code like «zext.h x10, x11 ; x10 = zero_ext(x11[15:0])».
Understand this scenario with real code like «zext.h x10, x11 ; x10 = zero_ext(x11[15:0])».
No. It only reads and writes integer registers; any memory access must be performed by a separate load or store instruction.
The result is written to rd at the current XLEN: 32 bits in RV32 and 64 bits in RV64; in both cases every bit above bit 15 is zero.