SQRSHL (vector)

Data processing (scalar floating-point and Advanced SIMD)

fixed bit field field the encoding fixes should be

Vector arithmetic binary uniform shift scalar

313029282726252423222120191817161514131211109876543210
01011110size1Rm010111RnRd
URS

01011110xx1xxxxx010111xxxxxxxxxx

Decode Sail

let 'd = UInt(Rd);
let 'n = UInt(Rn);
let 'm = UInt(Rm);
let 'esize = (8 << UInt(size));
let 'datasize = esize;
let 'elements = 1;
let is_unsigned : bool = U == 0b1;
let rounding : bool = R == 0b1;
let saturating : bool = S == 0b1;
if S == 0b0 & size != 0b11 then {
    throw(Error_Undefined())
};
execute_aarch64_instrs_vector_arithmetic_binary_uniform_shift_sisd(d, datasize, elements, esize, m, n, rounding, saturating, is_unsigned)

Vector arithmetic binary uniform shift SIMD

313029282726252423222120191817161514131211109876543210
0Q001110size1Rm010111RnRd
URS

0x001110xx1xxxxx010111xxxxxxxxxx

Decode Sail

let 'd = UInt(Rd);
let 'n = UInt(Rn);
let 'm = UInt(Rm);
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;
let rounding : bool = R == 0b1;
let saturating : bool = S == 0b1;
execute_aarch64_instrs_vector_arithmetic_binary_uniform_shift_sisd(d, datasize, elements, esize, m, n, rounding, saturating, is_unsigned)

Operation Sail

CheckFPAdvSIMDEnabled64();
let operand1 : bits('datasize) = V_read(n, datasize);
let operand2 : bits('datasize) = V_read(m, datasize);
result : bits('datasize) = undefined;
sat : bool = undefined;
foreach (e from 0 to (elements - 1) by 1 in inc) {
    element : int = asl_Int(Elem_read(operand1, e, esize), is_unsigned);
    shift : int = SInt(Elem_read(operand2, e, esize)[7 .. 0]);
    if shift >= 0 then {
        element = (element << shift)
    } else {
        let 'shift = negate(shift);
        element = RShr(element, shift, rounding)
    };
    let 'element = element;
    if saturating then {
        let (__tup_0 : bits('esize), __tup_1 : bool) =
          SatQ(element, esize, is_unsigned)
        in
          {
              result = Elem_set(result, e, esize, __tup_0);
              sat = __tup_1
          };
        if sat then {
            FPSR[QC] = 0b1
        };
        ()
    } else {
        result = Elem_set(result, e, esize, element[esize - 1 .. 0])
    }
};
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.