Sign Extend Byte

Sign-extend the low byte of a register to the full register width.

Bit Manipulation

Semantics

rd = SignExtend(rs1[7:0]). A base instruction on PowerISA and ARM, an extension (Zbb) on RISC-V, and a load/move form on x86.

Architecture Instructions Expressed as How this architecture does it
x86 one instruction Sign extension happens as part of the move rather than as a standalone operation.
ARM one instruction An alias of the bitfield instruction SBFM, like most AArch64 extend and shift mnemonics.
RISC-V one instruction Zbb. In the base ISA the same effect requires a shift-left followed by an arithmetic shift-right.
PowerISA one instruction Base instruction, with extsh and extsw for the wider forms.