bl

Branch with Link

BL <label>

Function call. Branches to label and stores return address in LR (X30).

Pseudocode Operation

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

Example

BL label

Encoding

Binary Layout
1
31
00101
30:26
imm26
25:0
 
Format Branch
Opcode 0x94000000
Extension Base

Operands

  • label
    Label

Related

Other forms of bl

  • bl Branch with Link (A32)

More in Base

Reference

Instruction Forms

Encoding Instruction ISA Bit pattern
0x94000000 BL <label> A64 1 | 00101 | imm26

Description

Branch with Link branches to a PC-relative offset, setting the register X30 to PC+4. It provides a hint that this is a subroutine call.

Operation

if IsFeatureImplemented(FEAT_GCS) && GCSPCREnabled(PSTATE.EL) then
    AddGCSRecord(PC64 + 4);
X[30, 64] = PC64 + 4;

BranchTo(PC64 + offset, BranchType_DIRCALL, FALSE);