CCMN (register)

Data processing (register)

fixed bit field field the encoding fixes should be

Integer conditional compare register

313029282726252423222120191817161514131211109876543210
sf0111010010Rmcond00Rn0nzcv
op

x0111010010xxxxxxxxx00xxxxx0xxxx

Decode Sail

let 'n = UInt(Rn);
let 'm = UInt(Rm);
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;
execute_aarch64_instrs_integer_conditional_compare_register(condition, datasize, flags, m, n, sub_op)

Operation Sail

flags : bits(4) = flags__arg;
taken : bool = false;
if ConditionHolds(condition) then {
    let operand1 : bits('datasize) = X_read(n, datasize);
    operand2 : bits('datasize) = X_read(m, datasize);
    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.