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
Zero-extends the least-significant 16 bits of rs to XLEN. Replaces slli+srai (sign-ext) or slli+srli (zero-ext) sequences. Part of Zbb.
ZEXT.H is a B/Zbb instruction for zero-extend low halfword. This page is checked against the official B extension semantics, with emphasis on XLEN, W suffixes, .uw suffixes, and bitwise or rotate boundaries.
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.
Except that W-suffixed forms produce a 32-bit result then sign-extend and .uw forms first extract a 32-bit unsigned operand, the result is written to rd at XLEN width.