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 |
| sf | 0 | 1 | 1 | 0 | 1 | 0 | 1 | imm19 | Rt | ||||||||||||||||||||||
| op | |||||||||||||||||||||||||||||||
x0110101xxxxxxxxxxxxxxxxxxxxxxxx
let 't = UInt(Rt); let 'datasize = if sf == 0b1 then 64 else 32; let iszero : bool = op == 0b0; let offset : bits(64) = SignExtend(imm19 @ 0b00, 64); execute_aarch64_instrs_branch_conditional_compare(datasize, iszero, offset, t)
let operand1 : bits('datasize) = X_read(t, datasize);
let branch_conditional : bool = true;
if IsZero(operand1) == iszero 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.