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 | 1 | 0 | 1 | 1 | 1 | 1 | 0 | size | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | Rn | Rd | |||||||||
| U | |||||||||||||||||||||||||||||||
01011110xx100000011110xxxxxxxxxx
let 'd = UInt(Rd); let 'n = UInt(Rn); let 'esize = (8 << UInt(size)); let 'datasize = esize; let 'elements = 1; let neg : bool = U == 0b1; execute_aarch64_instrs_vector_arithmetic_unary_diff_neg_sat_sisd(d, datasize, elements, esize, n, neg)
| 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 | 0 | 0 | 1 | 1 | 1 | 0 | size | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | Rn | Rd | |||||||||
| U | |||||||||||||||||||||||||||||||
0x001110xx100000011110xxxxxxxxxx
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 neg : bool = U == 0b1;
execute_aarch64_instrs_vector_arithmetic_unary_diff_neg_sat_sisd(d, datasize, elements, esize, n, neg)
CheckFPAdvSIMDEnabled64();
let operand : bits('datasize) = V_read(n, datasize);
result : bits('datasize) = undefined;
element : int = undefined;
sat : bool = undefined;
foreach (e from 0 to (elements - 1) by 1 in inc) {
element = SInt(Elem_read(operand, e, esize));
if neg then {
element = negate(element)
} else {
element = Abs(element)
};
let (__tup_0 : bits('esize), __tup_1 : bool) =
SignedSatQ(element, esize)
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.