FCMP (scalar)

Data processing (scalar floating-point and Advanced SIMD)

fixed bit field field the encoding fixes should be

Float compare unconditional

313029282726252423222120191817161514131211109876543210
00011110ftype1Rm001000Rn0x000
opc

00011110xx1xxxxx001000xxxxx0x000

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 = [opc[1]] == 0b1;
let cmp_with_zero : bool = [opc[0]] == 0b1;
execute_aarch64_instrs_float_compare_uncond(cmp_with_zero, datasize, m, n, signal_all_nans)

Operation Sail

CheckFPEnabled64();
let operand1 : bits('datasize) = V_read(n, datasize);
let operand2 : bits('datasize) = if cmp_with_zero then FPZero(0b0, datasize)
else
  V_read(m, datasize);
(PSTATE.N @ PSTATE.Z @ PSTATE.C @ PSTATE.V) = FPCompare(operand1, operand2, signal_all_nans, FPCR_read())

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.