target/arm: Implement FCVT (scalar, fixed-point) for fp16

Backports commit 2752728016bef06e7c9cfb961019272859beeca4 from qemu
This commit is contained in:
Richard Henderson 2018-05-15 22:08:01 -04:00 committed by Lioncash
parent 8436080518
commit 9b42d01480
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -5798,8 +5798,21 @@ static void disas_fp_fixed_conv(DisasContext *s, uint32_t insn)
bool sf = extract32(insn, 31, 1);
bool itof;
if (sbit || (type > 1)
|| (!sf && scale < 32)) {
if (sbit || (!sf && scale < 32)) {
unallocated_encoding(s);
return;
}
switch (type) {
case 0: /* float32 */
case 1: /* float64 */
break;
case 3: /* float16 */
if (arm_dc_feature(s, ARM_FEATURE_V8_FP16)) {
break;
}
/* fallthru */
default:
unallocated_encoding(s);
return;
}