From d4ef57288f19317de4e60a3b20425250cd6cd933 Mon Sep 17 00:00:00 2001 From: Andrew Weintraub Date: Thu, 2 Nov 2017 14:29:38 +0000 Subject: 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 Reviewed-by: dsinclair --- third_party/base/allocator/partition_allocator/spin_lock.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'third_party/base') diff --git a/third_party/base/allocator/partition_allocator/spin_lock.cc b/third_party/base/allocator/partition_allocator/spin_lock.cc index 803e4d6abc..8d7151a8b7 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 -- cgit v1.2.3