Does SEXT.H access memory?
No. It only reads and writes integer registers; any memory access must be performed by a separate load or store instruction.
Sign-extend halfword
Sign-extends the least-significant 16 bits of rs to XLEN. Replaces slli+srai (sign-ext) or slli+srli (zero-ext) sequences. Part of Zbb.
SEXT.H is a B/Zbb instruction for sign-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 «sext.h x10, x11 ; x10 = sign_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.