From 5f7cda29add367c5381775a314ec9f90e311457a Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Fri, 15 Nov 2019 12:43:50 -0800
Subject: [PATCH] cpu_relax: Fix MIPS check

BOOST_ARCH_MIPS as a macro is totally broken. It always gets defined to either 32
or 64 with a bunch of zeroes depending on the architecture.

Use GCC's internal define to check the architecture properly.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 boost/fiber/detail/cpu_relax.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/boost/fiber/detail/cpu_relax.hpp b/boost/fiber/detail/cpu_relax.hpp
index 72564394..f40545c2 100644
--- a/boost/fiber/detail/cpu_relax.hpp
+++ b/boost/fiber/detail/cpu_relax.hpp
@@ -47,7 +47,7 @@ namespace detail {
 # else
 #  define cpu_relax() asm volatile ("nop" ::: "memory");
 # endif
-#elif BOOST_ARCH_MIPS
+#elif BOOST_ARCH_MIPS && (__mips_isa_rev > 1)
 # define cpu_relax() asm volatile ("pause" ::: "memory");
 #elif BOOST_ARCH_PPC
 // http://code.metager.de/source/xref/gnu/glibc/sysdeps/powerpc/sys/platform/ppc.h
