FMIN (scalar)

Data processing (scalar floating-point and Advanced SIMD)

fixed bit field field the encoding fixes should be

Float arithmetic max min

313029282726252423222120191817161514131211109876543210
00011110ftype1Rm010110RnRd
op

00011110xx1xxxxx010110xxxxxxxxxx

Decode Sail

let 'd = UInt(Rd);
let 'n = UInt(Rn);
let 'm = UInt(Rm);
esize : {16, 32, 64} = 16;
match ftype {
  0b00 => {
      esize = 32
  },
  0b01 => {
      esize = 64
  },
  0b10 => {
      throw(Error_Undefined())
  },
  0b11 => {
      if HaveFP16Ext() then {
          esize = 16
      } else {
          throw(Error_Undefined())
      }
  }
};
let 'esize = esize;
operation : FPMaxMinOp = undefined;
match op {
  0b00 => {
      operation = FPMaxMinOp_MAX
  },
  0b01 => {
      operation = FPMaxMinOp_MIN
  },
  0b10 => {
      operation = FPMaxMinOp_MAXNUM
  },
  0b11 => {
      operation = FPMaxMinOp_MINNUM
  }
};
let operation = operation;
execute_aarch64_instrs_float_arithmetic_max_min(d, esize, m, n, operation)

Operation Sail

CheckFPEnabled64();
let operand1 : bits('esize) = V_read(n, esize);
let operand2 : bits('esize) = V_read(m, esize);
let fpcr : FPCRType = FPCR_read();
let merge : bool = IsMerging(fpcr);
result : bits(128) = if merge then V_read(n, 128) else Zeros(128);
match operation {
  FPMaxMinOp_MAX => {
      result = Elem_set(result, 0, esize, FPMax(operand1, operand2, fpcr))
  },
  FPMaxMinOp_MIN => {
      result = Elem_set(result, 0, esize, FPMin(operand1, operand2, fpcr))
  },
  FPMaxMinOp_MAXNUM => {
      result = Elem_set(result, 0, esize, FPMaxNum(operand1, operand2, fpcr))
  },
  FPMaxMinOp_MINNUM => {
      result = Elem_set(result, 0, esize, FPMinNum(operand1, operand2, fpcr))
  }
};
V_set(d, 128) = result

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.