FCCMP (scalar)

Data processing (scalar floating-point and Advanced SIMD)

fixed bit field field the encoding fixes should be

Float compare cond

313029282726252423222120191817161514131211109876543210
00011110ftype1Rmcond01Rn0nzcv
op

00011110xx1xxxxxxxxx01xxxxx0xxxx

Decode Sail

let 'n = UInt(Rn);
let 'm = UInt(Rm);
datasize : {16, 32, 64} = 16;
match ftype {
  0b00 => {
      datasize = 32
  },
  0b01 => {
      datasize = 64
  },
  0b10 => {
      throw(Error_Undefined())
  },
  0b11 => {
      if HaveFP16Ext() then {
          datasize = 16
      } else {
          throw(Error_Undefined())
      }
  }
};
let 'datasize = datasize;
let signal_all_nans : bool = op == 0b1;
let condition : bits(4) = cond;
let flags : bits(4) = nzcv;
execute_aarch64_instrs_float_compare_cond(condition, datasize, flags, m, n, signal_all_nans)

Operation Sail

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