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 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | ftype | 1 | Rm | cond | 0 | 1 | Rn | 1 | nzcv | |||||||||||||||
| op | |||||||||||||||||||||||||||||||
00011110xx1xxxxxxxxx01xxxxx1xxxx
let 'n = UInt(Rn);
let 'm = UInt(Rm);
datasize : {16, 32, 64} = 16;
match ftype {
0b00 => {
datasize = 32
},
0b01 => {
datasize = 64
},
0b10 => {
throw(Error_Undefined())
},
0b11 => {
if HaveFP16Ext() then {
datasize = 16
} else {
throw(Error_Undefined())
}
}
};
let 'datasize = datasize;
let signal_all_nans : bool = op == 0b1;
let condition : bits(4) = cond;
let flags : bits(4) = nzcv;
execute_aarch64_instrs_float_compare_cond(condition, datasize, flags, m, n, signal_all_nans)
flags : bits(4) = flags__arg;
CheckFPEnabled64();
let operand1 : bits('datasize) = V_read(n, datasize);
let operand2 : bits('datasize) = V_read(m, datasize);
taken : bool = false;
if ConditionHolds(condition) then {
flags = FPCompare(operand1, operand2, signal_all_nans, FPCR_read());
taken = true
};
(PSTATE.N @ PSTATE.Z @ PSTATE.C @ PSTATE.V) = flags;
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.