summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/pulseaudio/libatomics-ops
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2011-12-02 12:20:09 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-05 22:47:08 +0000
commite3a384578f677c05d812d99c2c92aa13670bd06a (patch)
tree256521c19b8ea3b4e216f508f4fef68eb651854e /meta/recipes-multimedia/pulseaudio/libatomics-ops
parentf5c071d93c9e6f57930bce56b1e4f009c160a826 (diff)
downloadast2050-yocto-poky-e3a384578f677c05d812d99c2c92aa13670bd06a.zip
ast2050-yocto-poky-e3a384578f677c05d812d99c2c92aa13670bd06a.tar.gz
libatomics-ops: patch source code for x32
This Fixes bug: [YOCTO #1418] Remove the `q' suffix on x86-64 atomic instructions. We don't need the `q' suffix on x86_64 atomic instructions for AO_t, which is defined as "unsigned long". "unsigned long" is 32bit for x32 and 64bit for x86-64. The register operand in x86-64 atomic instructions is sufficient to properly determine the register size. (From OE-Core rev: daaaeb1bd1467a2bed75722ce3ff35be970402e0) Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/pulseaudio/libatomics-ops')
-rw-r--r--meta/recipes-multimedia/pulseaudio/libatomics-ops/libatomics-ops_fix_for_x32.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/pulseaudio/libatomics-ops/libatomics-ops_fix_for_x32.patch b/meta/recipes-multimedia/pulseaudio/libatomics-ops/libatomics-ops_fix_for_x32.patch
new file mode 100644
index 0000000..1768606
--- /dev/null
+++ b/meta/recipes-multimedia/pulseaudio/libatomics-ops/libatomics-ops_fix_for_x32.patch
@@ -0,0 +1,41 @@
+Upstream-Status: Pending
+
+Remove the `q' suffix on x86-64 atomic instructions.
+
+We don't need the `q' suffix on x86_64 atomic instructions for AO_t,
+which is defined as "unsigned long". "unsigned long" is 32bit for x32
+and 64bit for x86-64. The register operand in x86-64 atomic instructions
+is sufficient to properly determine the register size.
+
+Received this patch from H.J. Lu <hjl.tools@gmail.com>
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/02
+
+--- libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86_64.h.x32 2005-09-28 17:16:38.000000000 -0700
++++ libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86_64.h 2011-12-02 09:29:54.265251875 -0800
+@@ -60,7 +60,7 @@ AO_fetch_and_add_full (volatile AO_t *p,
+ {
+ AO_t result;
+
+- __asm__ __volatile__ ("lock; xaddq %0, %1" :
++ __asm__ __volatile__ ("lock; xadd %0, %1" :
+ "=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
+ : "memory");
+ return result;
+@@ -111,7 +111,7 @@ AO_int_fetch_and_add_full (volatile unsi
+ AO_INLINE void
+ AO_or_full (volatile AO_t *p, AO_t incr)
+ {
+- __asm__ __volatile__ ("lock; orq %1, %0" :
++ __asm__ __volatile__ ("lock; or %1, %0" :
+ "=m" (*p) : "r" (incr), "m" (*p) : "memory");
+ }
+
+@@ -136,7 +136,7 @@ AO_compare_and_swap_full(volatile AO_t *
+ AO_t old, AO_t new_val)
+ {
+ char result;
+- __asm__ __volatile__("lock; cmpxchgq %3, %0; setz %1"
++ __asm__ __volatile__("lock; cmpxchg %3, %0; setz %1"
+ : "=m"(*addr), "=q"(result)
+ : "m"(*addr), "r" (new_val), "a"(old) : "memory");
+ return (int) result;
OpenPOWER on IntegriCloud