SUQADD (vector)

Data processing (scalar floating-point and Advanced SIMD)

fixed bit field field the encoding fixes should be

Vector arithmetic unary add saturating scalar

313029282726252423222120191817161514131211109876543210
01011110size100000001110RnRd
U

01011110xx100000001110xxxxxxxxxx

Decode Sail

let 'd = UInt(Rd);
let 'n = UInt(Rn);
let 'esize = (8 << UInt(size));
let 'datasize = esize;
let 'elements = 1;
let is_unsigned : bool = U == 0b1;
execute_aarch64_instrs_vector_arithmetic_unary_add_saturating_sisd(d, datasize, elements, esize, n, is_unsigned)

Vector arithmetic unary add saturating SIMD

313029282726252423222120191817161514131211109876543210
0Q001110size100000001110RnRd
U

0x001110xx100000001110xxxxxxxxxx

Decode Sail

let 'd = UInt(Rd);
let 'n = UInt(Rn);
if (size @ Q) == 0b110 then {
    throw(Error_Undefined())
};
let 'esize = (8 << UInt(size));
let 'datasize = if Q == 0b1 then 128 else 64;
let 'elements = DIV(datasize, esize);
let is_unsigned : bool = U == 0b1;
execute_aarch64_instrs_vector_arithmetic_unary_add_saturating_sisd(d, datasize, elements, esize, n, is_unsigned)

Operation Sail

CheckFPAdvSIMDEnabled64();
let operand : bits('datasize) = V_read(n, datasize);
result : bits('datasize) = undefined;
let operand2 : bits('datasize) = V_read(d, datasize);
op1 : int = undefined;
op2 : int = undefined;
sat : bool = undefined;
foreach (e from 0 to (elements - 1) by 1 in inc) {
    op1 = asl_Int(Elem_read(operand, e, esize), not_bool(is_unsigned));
    op2 = asl_Int(Elem_read(operand2, e, esize), is_unsigned);
    let (__tup_0 : bits('esize), __tup_1 : bool) =
      SatQ(op1 + op2, esize, is_unsigned)
    in
      {
          result = Elem_set(result, e, esize, __tup_0);
          sat = __tup_1
      };
    if sat then {
        FPSR[QC] = 0b1
    };
    ()
};
V_set(d, datasize) = 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.