Branches, exception generating and system instructions
fixed bit field field the encoding fixes should be
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | imm19 | 0 | cond | |||||||||||||||||||||
01010100xxxxxxxxxxxxxxxxxxx0xxxx
let offset : bits(64) = SignExtend(imm19 @ 0b00, 64); let condition : bits(4) = cond; execute_aarch64_instrs_branch_conditional_cond(condition, offset)
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.