From 2f7d891bc32369d6b96612852f4bfde7861af273 Mon Sep 17 00:00:00 2001
From: klzgrad <kizdiv@gmail.com>
Date: Sat, 30 Nov 2019 22:38:31 +0800
Subject: [PATCH] allocator: Improve MIPS coverage of spinlocks

---
 src/base/allocator/partition_allocator/spin_lock.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/base/allocator/partition_allocator/spin_lock.cc b/src/base/allocator/partition_allocator/spin_lock.cc
index 5cc0416860..afd2a57b28 100644
--- a/src/base/allocator/partition_allocator/spin_lock.cc
+++ b/src/base/allocator/partition_allocator/spin_lock.cc
@@ -34,12 +34,12 @@
 #define YIELD_PROCESSOR __asm__ __volatile__("pause")
 #elif (defined(ARCH_CPU_ARMEL) && __ARM_ARCH >= 6) || defined(ARCH_CPU_ARM64)
 #define YIELD_PROCESSOR __asm__ __volatile__("yield")
-#elif defined(ARCH_CPU_MIPSEL)
+#elif defined(ARCH_CPU_MIPSEL) && __mips_isa_rev < 2
 // The MIPS32 docs state that the PAUSE instruction is a no-op on older
 // architectures (first added in MIPS32r2). To avoid assembler errors when
 // targeting pre-r2, we must encode the instruction manually.
 #define YIELD_PROCESSOR __asm__ __volatile__(".word 0x00000140")
-#elif defined(ARCH_CPU_MIPS64EL) && __mips_isa_rev >= 2
+#elif defined(ARCH_CPU_MIPS_FAMILY) && __mips_isa_rev >= 2
 // Don't bother doing using .word here since r2 is the lowest supported mips64
 // that Chromium supports.
 #define YIELD_PROCESSOR __asm__ __volatile__("pause")