You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.0 KiB

  1. From 5f7cda29add367c5381775a314ec9f90e311457a Mon Sep 17 00:00:00 2001
  2. From: Rosen Penev <rosenp@gmail.com>
  3. Date: Fri, 15 Nov 2019 12:43:50 -0800
  4. Subject: [PATCH] cpu_relax: Fix MIPS check
  5. BOOST_ARCH_MIPS as a macro is totally broken. It always gets defined to either 32
  6. or 64 with a bunch of zeroes depending on the architecture.
  7. Use GCC's internal define to check the architecture properly.
  8. Signed-off-by: Rosen Penev <rosenp@gmail.com>
  9. ---
  10. boost/fiber/detail/cpu_relax.hpp | 2 +-
  11. 1 file changed, 1 insertion(+), 1 deletion(-)
  12. diff --git a/boost/fiber/detail/cpu_relax.hpp b/boost/fiber/detail/cpu_relax.hpp
  13. index 72564394..f40545c2 100644
  14. --- a/boost/fiber/detail/cpu_relax.hpp
  15. +++ b/boost/fiber/detail/cpu_relax.hpp
  16. @@ -47,7 +47,7 @@ namespace detail {
  17. # else
  18. # define cpu_relax() asm volatile ("nop" ::: "memory");
  19. # endif
  20. -#elif BOOST_ARCH_MIPS
  21. +#elif BOOST_ARCH_MIPS && (__mips_isa_rev > 1)
  22. # define cpu_relax() asm volatile ("pause" ::: "memory");
  23. #elif BOOST_ARCH_PPC
  24. // http://code.metager.de/source/xref/gnu/glibc/sysdeps/powerpc/sys/platform/ppc.h