b

Branch

B <label>

Unconditional branch to label.

Details

Unconditional branch to a PC-relative label in AArch64. The 26-bit signed immediate is shifted left by 2 and added to the current PC. No condition flags are affected. This is an AArch64-only instruction.

Pseudocode Operation

PC ← PC + (SignExtend(imm26, 64) << 2)

Example

B label

Encoding

Binary Layout
0
00101
imm26
 
Format Branch
Opcode 0x14000000
Extension Base

Operands

  • label
    Label

Reference (Arm A64 ISA)

Instruction Forms

Encoding Instruction ISA Bit pattern
0x54000000 B.<cond> <label> A64 01010100 | imm19 | 0 | cond
0x14000000 B <label> A64 0 | 00101 | imm26

Description

Branch causes an unconditional branch to a label at a PC-relative offset, with a hint that this is not a subroutine call or return.

Operation

BranchTo(PC64 + offset, BranchType_DIR, FALSE);