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 | 1 | 0 | 0 | 0 | 1 | 0 | Rn | Rd | |||||||||
| U | op | ||||||||||||||||||||||||||||||
01011110xx100000100010xxxxxxxxxx
let 'd = UInt(Rd);
let 'n = UInt(Rn);
if size != 0b11 then {
throw(Error_Undefined())
};
let 'esize = (8 << UInt(size));
let 'datasize = esize;
let 'elements = 1;
comparison : CompareOp = undefined;
match op @ U {
0b00 => {
comparison = CompareOp_GT
},
0b01 => {
comparison = CompareOp_GE
},
0b10 => {
comparison = CompareOp_EQ
},
0b11 => {
comparison = CompareOp_LE
}
};
let comparison = comparison;
execute_aarch64_instrs_vector_arithmetic_unary_cmp_int_bulk_sisd(comparison, d, datasize, elements, esize, n)
| 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 | 1 | 0 | 0 | 0 | 1 | 0 | Rn | Rd | |||||||||
| U | op | ||||||||||||||||||||||||||||||
0x001110xx100000100010xxxxxxxxxx
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);
comparison : CompareOp = undefined;
match op @ U {
0b00 => {
comparison = CompareOp_GT
},
0b01 => {
comparison = CompareOp_GE
},
0b10 => {
comparison = CompareOp_EQ
},
0b11 => {
comparison = CompareOp_LE
}
};
let comparison = comparison;
execute_aarch64_instrs_vector_arithmetic_unary_cmp_int_bulk_sisd(comparison, d, datasize, elements, esize, n)
CheckFPAdvSIMDEnabled64();
let operand : bits('datasize) = V_read(n, datasize);
result : bits('datasize) = undefined;
element : int = undefined;
test_passed : bool = undefined;
foreach (e from 0 to (elements - 1) by 1 in inc) {
element = SInt(Elem_read(operand, e, esize));
match comparison {
CompareOp_GT => {
test_passed = element > 0
},
CompareOp_GE => {
test_passed = element >= 0
},
CompareOp_EQ => {
test_passed = element == 0
},
CompareOp_LE => {
test_passed = element <= 0
},
CompareOp_LT => {
test_passed = element < 0
}
};
result = Elem_set(result, e, esize, if test_passed then Ones(esize) else
Zeros(esize))
};
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.