0006-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. From b30f380cd88ae181a4a6a3a4784206ffe3ccd19b Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Thu, 31 Dec 2015 14:35:35 -0800
  4. Subject: [PATCH] nativesdk-glibc: Allow 64 bit atomics for x86
  5. The fix consist of allowing 64bit atomic ops for x86.
  6. This should be safe for i586 and newer CPUs.
  7. It also makes the synchronization more efficient.
  8. Upstream-Status: Inappropriate [OE-Specific]
  9. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
  10. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
  11. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  12. ---
  13. sysdeps/x86/atomic-machine.h | 3 +--
  14. 1 file changed, 1 insertion(+), 2 deletions(-)
  15. diff --git a/sysdeps/x86/atomic-machine.h b/sysdeps/x86/atomic-machine.h
  16. index 695222e4fa..9d39bfdbd5 100644
  17. --- a/sysdeps/x86/atomic-machine.h
  18. +++ b/sysdeps/x86/atomic-machine.h
  19. @@ -52,15 +52,14 @@ typedef uintmax_t uatomic_max_t;
  20. #define LOCK_PREFIX "lock;"
  21. #define USE_ATOMIC_COMPILER_BUILTINS 1
  22. +# define __HAVE_64B_ATOMICS 1
  23. #ifdef __x86_64__
  24. -# define __HAVE_64B_ATOMICS 1
  25. # define SP_REG "rsp"
  26. # define SEG_REG "fs"
  27. # define BR_CONSTRAINT "q"
  28. # define IBR_CONSTRAINT "iq"
  29. #else
  30. -# define __HAVE_64B_ATOMICS 0
  31. # define SP_REG "esp"
  32. # define SEG_REG "gs"
  33. # define BR_CONSTRAINT "r"