UQXTN (vector)

Data processing (scalar floating-point and Advanced SIMD)

fixed bit field field the encoding fixes should be

Vector arithmetic unary extract sat scalar

313029282726252423222120191817161514131211109876543210
01111110size100001010010RnRd
U

01111110xx100001010010xxxxxxxxxx

Decode Sail

let 'd = UInt(Rd);
let 'n = UInt(Rn);
if size == 0b11 then {
    throw(Error_Undefined())
};
let 'esize = (8 << UInt(size));
let 'datasize = esize;
let 'part = 0;
let 'elements = 1;
let is_unsigned : bool = U == 0b1;
execute_aarch64_instrs_vector_arithmetic_unary_extract_sat_sisd(d, datasize, elements, esize, n, part, is_unsigned)

Vector arithmetic unary extract sat SIMD

313029282726252423222120191817161514131211109876543210
0Q101110size100001010010RnRd
U

0x101110xx100001010010xxxxxxxxxx

Decode Sail

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

Operation Sail

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