qYieldCpu: ensure we don't use asm statement with MSVC on ARM
Amends a7f227f56cfe562280e89d3c73040f7e8384129e. It doesn't support that anywhere except i386, and even there it has a different syntax than what we're using here. This code assumed ARM was only ued with GCC-like compilers. qglobal.c.obj : error LNK2019: unresolved external symbol asm referenced in function tst_qYieldCpu tests\auto\corelib\global\qglobal\tst_qglobal.exe : fatal error LNK1120: 1 unresolved externals Note: if we're getting here, it means the _YIELD_PROCESSOR() generic macro was not used, which means there is no ARM YIELD being emitted for MSVC on ARM for C code (for C++, the macro appears to be working). This is likely to be a performance issue, which will need to be fixed by someone who has an interest in improving performance on those conditions. Fixes: QTBUG-119881 Change-Id: Ica7a43f6147b49c187ccfffd179f04e1ab643302 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 91478930711c99c876f0df9475c056445eea96b6) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
35ffe8749e
commit
98af9bd9d3
@ -48,7 +48,7 @@ void qYieldCpu(void)
|
||||
|
||||
#elif __has_builtin(__builtin_arm_yield)
|
||||
__builtin_arm_yield();
|
||||
#elif defined(Q_PROCESSOR_ARM) && Q_PROCESSOR_ARM >= 7
|
||||
#elif defined(Q_PROCESSOR_ARM) && Q_PROCESSOR_ARM >= 7 && defined(Q_CC_GNU)
|
||||
asm("yield"); // this works everywhere
|
||||
|
||||
#elif __has_builtin(__builtin_riscv_pause)
|
||||
|
Loading…
x
Reference in New Issue
Block a user