sxtb

Sign Extend Byte

SXTB <Wd>, <Wn>

Extracts the lowest 8 bits and sign-extends to 32 bits (Alias for SBFM).

Details

Extracts the lowest 8 bits of a 32-bit register and sign-extends the result to fill all 32 bits. No condition flags are affected. This is an AArch64 alias for SBFM (Signed Bitfield Move) with bit positions 0 and 7.

Pseudocode Operation

Wd ← SignExtend(Wn[7:0], 32)

Example

SXTB w0, w1

Encoding

Binary Layout
0
00
100110
0
000000
000111
Rn
Rd
 
Format Bitfield
Opcode 0x13001C00
Extension Base

Operands

  • Wd
    Destination 32-bit integer register
  • Wn
    First source / base 32-bit integer register

Reference (Arm A64 ISA)

Instruction Forms

Encoding Instruction ISA Bit pattern
0x13001C00 SXTB <Wd>, <Wn> A64 0 | 00 | 100110 | 0 | 000000 | 000111 | Rn | Rd
0x93401C00 SXTB <Xd>, <Wn> A64 1 | 00 | 100110 | 1 | 000000 | 000111 | Rn | Rd
0x0410A000 SXTB <Zd>.<T>, <Pg>/M, <Zn>.<T> A64 00000100 | size | 010 | 00 | 0 | 101 | Pg | Zn | Zd

Description

Signed Extend Byte extracts an 8-bit value from a register, sign-extends it to the size of the register, and writes the result to the destination register.