sext.b Sign-extend byte Sign-extends the least-significant byte in the source to XLEN by copying the most-significant bit in the byte (i.e., bit 7) to all of the more-significant bits. Assembly format sext.b xd, xs1 Decode Variables Bits<5> xs1 = $encoding[19:15]; Bits<5> xd = $encoding[11:7]; Execution if (implemented?(ExtensionName::B) && (CSR[misa].B == 1'b0)) { raise(ExceptionCode::IllegalInstruction, mode(), $encoding); } if (xlen() == 32) { X[xd] = {{24{X[xs1][7]}}, X[xs1][7:0]}; } else if (xlen() == 64) { X[xd] = {{56{X[xs1][7]}}, X[xs1][7:0]}; } Exceptions This instruction may result in the following synchronous exceptions: IllegalInstruction Encoding Defining extension Zbb Access M Always Containing profiles Mandatory: RVA22S64, RVA22U64, RVA23S64, RVA23U64, RVB23S64, RVB23U64 Optional: None