Data processing (scalar floating-point and Advanced SIMD)
fixed bit field field the encoding fixes should be
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| 0 | Q | 1 | 0 | 1 | 1 | 1 | 0 | size | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | Rn | Rd | |||||||||
| U | |||||||||||||||||||||||||||||||
0x101110xx110000001110xxxxxxxxxx
let 'd = UInt(Rd);
let 'n = UInt(Rn);
if (size @ Q) == 0b100 then {
throw(Error_Undefined())
};
if size == 0b11 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_reduce_add_long(d, datasize, elements, esize, n, is_unsigned)
CheckFPAdvSIMDEnabled64();
let operand : bits('datasize) = V_read(n, datasize);
sum : int = asl_Int(Elem_read(operand, 0, esize), is_unsigned);
foreach (e from 1 to (elements - 1) by 1 in inc) {
sum = sum + asl_Int(Elem_read(operand, e, esize), is_unsigned)
};
let 'sum = sum;
V_set(d, 2 * esize) = sum[2 * esize - 1 .. 0]
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.