void-packages/srcpkgs/qt6-base/patches/arm-yield.patch

38 lines
1.2 KiB
Diff

From 8128abeaece5b05476f79ff493597b838b223512 Mon Sep 17 00:00:00 2001
From: Marc Mutz <marc.mutz@qt.io>
Date: Wed, 3 Aug 2022 17:23:20 +0200
Subject: Fix qYieldCpu() for ARM < ARMv7
Apparently, we still support these architecture versions, and there's
no way to detect ARMv6k-or-greater specifically, so exclude yield for
ARM < ARMv7.
Amends 877c158c5976bebffd0ff02c39b6b66a842c6344.
Fixes: QTBUG-104316
Pick-to: 6.4 6.3
Change-Id: I51a2f0f8e0993dba41e47bb6110473ac8e7cd32a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
---
src/corelib/global/qsimd_p.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'src/corelib/global/qsimd_p.h')
diff --git a/src/corelib/global/qsimd_p.h b/src/corelib/global/qsimd_p.h
index ad78c3934f..093fc3aedc 100644
--- a/src/corelib/global/qsimd_p.h
+++ b/src/corelib/global/qsimd_p.h
@@ -397,7 +397,7 @@ static inline void qYieldCpu()
{
#if defined(Q_PROCESSOR_X86)
_mm_pause();
-#elif defined(Q_PROCESSOR_ARM)
+#elif defined(Q_PROCESSOR_ARM) && Q_PROCESSOR_ARM >= 7 /* yield was added in ARMv7 */
# if __has_builtin(__builtin_arm_yield) /* e.g. Clang */
__builtin_arm_yield();
# elif defined(Q_OS_INTEGRITY) || \
--
cgit v1.2.1