blob: c66bcf80c04b75f8166b65186cb68fd53f6f36ca [file] [log] [blame]
From 946d1cadf0bb54216409e8e0eb09be3e96044dbf Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 31 Dec 2015 14:35:35 -0800
Subject: [PATCH] nativesdk-glibc: Allow 64 bit atomics for x86
The fix consist of allowing 64bit atomic ops for x86.
This should be safe for i586 and newer CPUs.
It also makes the synchronization more efficient.
Upstream-Status: Inappropriate [OE-Specific]
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
sysdeps/x86/atomic-machine.h | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/sysdeps/x86/atomic-machine.h b/sysdeps/x86/atomic-machine.h
index f24f1c71ed..574487ca54 100644
--- a/sysdeps/x86/atomic-machine.h
+++ b/sysdeps/x86/atomic-machine.h
@@ -26,19 +26,14 @@
#define LOCK_PREFIX "lock;"
#define USE_ATOMIC_COMPILER_BUILTINS 1
+# define __HAVE_64B_ATOMICS 1
#ifdef __x86_64__
-# define __HAVE_64B_ATOMICS 1
# define SP_REG "rsp"
# define SEG_REG "fs"
# define BR_CONSTRAINT "q"
# define IBR_CONSTRAINT "iq"
#else
-/* Since the Pentium, i386 CPUs have supported 64-bit atomics, but the
- i386 psABI supplement provides only 4-byte alignment for uint64_t
- inside structs, so it is currently not possible to use 64-bit
- atomics on this platform. */
-# define __HAVE_64B_ATOMICS 0
# define SP_REG "esp"
# define SEG_REG "gs"
# define BR_CONSTRAINT "r"