blob: 372dca727ed94d7cce04f6db01a3e90772070741 [file] [log] [blame]
Andrew Geissler635e0e42020-08-21 15:58:33 -05001From bd0486cab67c3441210aed48caab67418610a765 Mon Sep 17 00:00:00 2001
Andrew Geissler82c905d2020-04-13 13:39:40 -05002From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 31 Dec 2015 14:35:35 -0800
Andrew Geissler635e0e42020-08-21 15:58:33 -05004Subject: [PATCH 06/29] nativesdk-glibc: Allow 64 bit atomics for x86
Andrew Geissler82c905d2020-04-13 13:39:40 -05005
6The fix consist of allowing 64bit atomic ops for x86.
7This should be safe for i586 and newer CPUs.
8It also makes the synchronization more efficient.
9
10Upstream-Status: Inappropriate [OE-Specific]
11
12Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
13Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16 sysdeps/x86/atomic-machine.h | 3 +--
17 1 file changed, 1 insertion(+), 2 deletions(-)
18
19diff --git a/sysdeps/x86/atomic-machine.h b/sysdeps/x86/atomic-machine.h
20index bb49648374..aa08d3c0a7 100644
21--- a/sysdeps/x86/atomic-machine.h
22+++ b/sysdeps/x86/atomic-machine.h
23@@ -58,15 +58,14 @@ typedef uintmax_t uatomic_max_t;
24 #endif
25
26 #define USE_ATOMIC_COMPILER_BUILTINS 1
27+# define __HAVE_64B_ATOMICS 1
28
29 #ifdef __x86_64__
30-# define __HAVE_64B_ATOMICS 1
31 # define SP_REG "rsp"
32 # define SEG_REG "fs"
33 # define BR_CONSTRAINT "q"
34 # define IBR_CONSTRAINT "iq"
35 #else
36-# define __HAVE_64B_ATOMICS 0
37 # define SP_REG "esp"
38 # define SEG_REG "gs"
39 # define BR_CONSTRAINT "r"
Andrew Geissler635e0e42020-08-21 15:58:33 -050040--
412.27.0
42