B.cond

Branches, exception generating and system instructions

fixed bit field field the encoding fixes should be

Branch conditional cond

313029282726252423222120191817161514131211109876543210
01010100imm190cond

01010100xxxxxxxxxxxxxxxxxxx0xxxx

Decode Sail

let offset : bits(64) = SignExtend(imm19 @ 0b00, 64);
let condition : bits(4) = cond;
execute_aarch64_instrs_branch_conditional_cond(condition, offset)

Operation Sail

let branch_conditional : bool = true;
if ConditionHolds(condition) then {
    BranchTo(PC_read() + offset, BranchType_DIR, branch_conditional)
} else {
    BranchNotTaken(BranchType_DIR, branch_conditional)
}

Made from ScarletNX's Sail at 166ad3910f80. sail-arm's definitions are Arm's ASL in Sail (BSD 3-Clause Clear, license); ScarletNX's fixups are GPL-3.0-or-later.