summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-01-30 15:16:18 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-02-01 09:23:17 +0100
commit5ac1516edd17eb4ddd94fe43a04fa4d736c50041 (patch)
tree400744f700a1674a1133d575004efdd06ecbb099
parent2b1068af97f1483b7bdb3d7a9257ab59fc4b2b59 (diff)
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>
-rw-r--r--src/corelib/global/qfloat16.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/global/qfloat16.cpp b/src/corelib/global/qfloat16.cpp
index c868e879b7..0c9bb80cb2 100644
--- a/src/corelib/global/qfloat16.cpp
+++ b/src/corelib/global/qfloat16.cpp
@@ -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;