bc.cond

Branch Consistent Conditional

BC.cond <label>

Branch if condition is met, with stronger ordering guarantees.

Details

Branch Consistent Conditional. Performs a PC-relative conditional branch with stronger ordering guarantees (Branch Consistent semantics). If the condition is true, branches to the target label with full consistency; branch prediction is constrained to prevent speculation-based reordering. Condition flags are not modified by the branch itself. AArch64-only; available from v8.8 onwards.

Pseudocode Operation

if (ConditionHolds(cond)) {
  PC ← PC + SignExtend(imm19 << 2)
  ConsistencyBarrier()
}

Example

BC.cond label

Encoding

Binary Layout
01010100
imm19
1
cond
 
Format Branch
Opcode 0x54000010
Extension Base (v8.8)

Operands

  • label
    Label
  • cond
    Cond

Reference (Arm A64 ISA)

Instruction Forms

Encoding Instruction ISA Bit pattern
0x54000010 BC.<cond> <label> A64 01010100 | imm19 | 1 | cond

Description

Branch Consistent conditionally to a label at a PC-relative offset, with a hint that this branch will behave very consistently and is very unlikely to change direction.

Operation

if ConditionHolds(cond) then
    BranchTo(PC64 + offset, BranchType_DIR, TRUE);
else
    BranchNotTaken(BranchType_DIR, TRUE);