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 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | imm5 | cond | 1 | 0 | Rn | 0 | nzcv | ||||||||||||||
| op | |||||||||||||||||||||||||||||||
x1111010010xxxxxxxxx10xxxxx0xxxx
let 'n = UInt(Rn);
let 'datasize = if sf == 0b1 then 64 else 32;
let sub_op : bool = op == 0b1;
let condition : bits(4) = cond;
let flags : bits(4) = nzcv;
let imm : bits('datasize) = ZeroExtend(imm5, datasize);
execute_aarch64_instrs_integer_conditional_compare_immediate(condition, datasize, flags, imm, n, sub_op)
flags : bits(4) = flags__arg;
taken : bool = false;
if ConditionHolds(condition) then {
let operand1 : bits('datasize) = X_read(n, datasize);
operand2 : bits('datasize) = imm;
carry_in : bits(1) = 0b0;
if sub_op then {
operand2 = not_vec(operand2);
carry_in = 0b1
};
let (_, __tup_1 : bits(4)) = AddWithCarry(operand1, operand2, carry_in)
in
{
flags = __tup_1
};
taken = true
};
(PSTATE.N @ PSTATE.Z @ PSTATE.C @ PSTATE.V) = flags;
if SPESampleInFlight then {
let conditional : bool = true;
SPESampleAddOpOther(conditional, taken)
};
()
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.