B.cond

Branch conditionally

This instruction branches conditionally to a label at a PC-relative offset, with a hint that this is not a subroutine call or return.

Encoding: 19-bit signed PC-relative branch offset

313029282726252423222120191817161514131211109876543210
010101000
imm19o0cond

B.<cond> <label>

Decoding algorithm

constant bits(64) offset = SignExtend(imm19:'00', 64);
constant bits(4) condition = cond;

Operation

constant boolean branch_conditional = TRUE;
if ConditionHolds(condition) then
    BranchTo(PC64 + offset, BranchType_DIR, branch_conditional);
else
    BranchNotTaken(BranchType_DIR, branch_conditional);

Explanations

<cond>: <label>: Is the program label to be conditionally branched to. Its offset from the address of this instruction, in the range +/-1MB, is encoded as "imm19" times 4.