Check for (__ARM_FP & 2) to verify 16-bit FP support

It appears __ARM_FP16_FORMAT_IEEE is sometimes incorrectly set, and
we need to double-check that 16-bit floating point is available in the
__ARM_FP macro as well.

Task-number: QTBUG-68314
Fixes: QTBUG-81461
Change-Id: I878d6b286aa31e21271163dc6c8f8038b9534c76
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Allan Sandfeld Jensen 2020-01-30 15:16:18 +01:00
parent 2b1068af97
commit 5ac1516edd

View File

@ -205,7 +205,7 @@ f16cextern void qFloatFromFloat16_fast(float *out, const quint16 *in, qsizetype
#undef f16cextern
}
#elif defined(__ARM_FP16_FORMAT_IEEE) && defined(__ARM_NEON__)
#elif defined(__ARM_FP16_FORMAT_IEEE) && defined(__ARM_NEON__) && (__ARM_FP & 2)
static inline bool hasFastF16()
{
return true;