extsb
Extend Sign Byte
extsb RT,RS
extsb. RT,RS
extsb. RT,RS
Sign extends the low byte of a register to the full width.
Details
The contents of the specified byte (RS)56 are placed into RA56:63, and RA0:55 are filled with a copy of (RS)56.
Pseudocode Operation
Programming Note
The extsb instruction is commonly used to sign-extend a byte value into a full word. Ensure the source register contains the correct byte to avoid unexpected results. This instruction operates at user privilege level and does not generate exceptions under normal conditions.
Example
extsb r3, r3
Encoding
Binary Layout
31
0
RS
6
RA
11
954
31
/
Operands
-
RA
Target -
RS
Source -
RT
Target General Purpose Register