commit | d4ef57288f19317de4e60a3b20425250cd6cd933 | [log] [tgz] |
---|---|---|
author | Andrew Weintraub <asweintraub@google.com> | Thu Nov 02 14:29:38 2017 +0000 |
committer | Chromium commit bot <commit-bot@chromium.org> | Thu Nov 02 14:29:38 2017 +0000 |
tree | 655b6edd48c2561eaaf4498b985e8e3af9670720 | |
parent | 87d06d37e0d04b2559598d1adbcb008074a20bd4 [diff] |
Only use the yield instruction on architectures that support it. This is a downstream patch of https://crrev.com/502028. Change-Id: Ib78784093332a81a7afd6959c66f5e266540f6d3 Reviewed-on: https://pdfium-review.googlesource.com/17350 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
diff --git a/third_party/base/allocator/partition_allocator/spin_lock.cc b/third_party/base/allocator/partition_allocator/spin_lock.cc index 803e4d6..8d7151a 100644 --- a/third_party/base/allocator/partition_allocator/spin_lock.cc +++ b/third_party/base/allocator/partition_allocator/spin_lock.cc
@@ -26,7 +26,7 @@ #elif defined(COMPILER_GCC) || defined(__clang__) #if defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_X86) #define YIELD_PROCESSOR __asm__ __volatile__("pause") -#elif defined(ARCH_CPU_ARMEL) || defined(ARCH_CPU_ARM64) +#elif (defined(ARCH_CPU_ARMEL) && __ARM_ARCH >= 6) || defined(ARCH_CPU_ARM64) #define YIELD_PROCESSOR __asm__ __volatile__("yield") #elif defined(ARCH_CPU_MIPSEL) // The MIPS32 docs state that the PAUSE instruction is a no-op on older