sext.h
Sign-extend halfword
This instruction is defined by:
Synopsis
Sign-extends the least-significant halfword in the source to XLEN by copying the most-significant bit in the halfword (i.e., bit 15) to all of the more-significant bits.
Execution
-
Pruned, XLEN == 64
-
Original
if (implemented?(ExtensionName::B) && (misa.B == 1'b0)) {
raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
}
X[xd] = {{48{X[xs1][15]}}, X[xs1][15:0]};