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 |
| sf | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | Rm | cond | 0 | 1 | Rn | Rd | |||||||||||||||
| op | o2 | ||||||||||||||||||||||||||||||
x0011010100xxxxxxxxx01xxxxxxxxxx
let 'd = UInt(Rd); let 'n = UInt(Rn); let 'm = UInt(Rm); let 'datasize = if sf == 0b1 then 64 else 32; let condition : bits(4) = cond; let else_inv : bool = op == 0b1; let else_inc : bool = o2 == 0b1; execute_aarch64_instrs_integer_conditional_select(condition, d, datasize, else_inc, else_inv, m, n)
taken : bool = false;
result : bits('datasize) = undefined;
if ConditionHolds(condition) then {
result = X_read(n, datasize);
taken = true
} else {
result = X_read(m, datasize);
if else_inv then {
result = not_vec(result)
};
if else_inc then {
result = result + 1
};
()
};
X_set(d, datasize) = result;
if SPESampleInFlight then {
let conditional : bool = true;
SPESampleAddOpOther(conditional, taken)
};
()
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.