Does ZEXT.H access memory?
No. It reads an integer source register and writes an integer destination register, with no data-memory access.
Zero-extend halfword
rd and rs select x0–x31. There is one integer source and no immediate; the encoded rs2 field is fixed to 00000.
funct7=0000100 and funct3=100; RV32 uses opcode=0110011 and RV64 uses opcode=0111011.
Read pre-execution rs[15:0], fill all bits above bit15 with zero and write the XLEN-wide result to rd; rd=x0 discards writeback.
Available with Zbb or Zbkb on RV32/RV64. Zbkb RV32 PACK / RV64 PACKW with rs2=x0 is this instruction.
No data-memory access; rd=rs is legal and reads the source before writeback.
Zero-extends rs[15:0] to XLEN. Zbb and Zbkb both provide this instruction: RV32 uses PACK with rs2=x0, while RV64 uses PACKW with rs2=x0.
Starts with machine-code field decoding, then shows operand reads, instruction-specific execution, and ISA-visible state update.
Assumes Zbb or Zbkb is enabled at the selected XLEN, with the fixed register values below and PC=0x2000; fetch succeeds and no asynchronous interrupt occurs. Steps are a teaching decomposition.
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.
Zero-extends rs[15:0] to XLEN. Zbb and Zbkb both provide this instruction: RV32 uses PACK with rs2=x0, while RV64 uses PACKW with rs2=x0.
RV32/RV64 Zbb or Zbkb, x11=0x12348001: zext.h x10, x11 produces x10=0x8001 with zero upper bits.
No. It reads an integer source register and writes an integer destination register, with no data-memory access.
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.