sext.h Sign-extend halfword This instruction is defined by: Encoding 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. Access M HS U VS VU Always Always Always Always Always Decode Variables Bits<5> xs1 = $encoding[19:15]; Bits<5> xd = $encoding[11:7]; Execution Pruned, XLEN == 64 Original X[xd] = {{48{X[xs1][15]}}, X[xs1][15:0]}; if (xlen() == 32) { X[xd] = {{16{X[xs1][15]}}, X[xs1][15:0]}; } else if (xlen() == 64) { X[xd] = {{48{X[xs1][15]}}, X[xs1][15:0]}; }