From: nitin.a.kamble@intel.com
To: hjl.tools@gmail.com, openembedded-core@lists.openembedded.org
Subject: [PATCH 11/11] libatomics-ops: patch source code for x32
Date: Fri, 2 Dec 2011 12:20:09 -0800 [thread overview]
Message-ID: <6a3108ac14517d67ab0739086666ddcfe025b848.1322856805.git.nitin.a.kamble@intel.com> (raw)
In-Reply-To: <a92d45d71d2d4aec2774e8feb23fcfdffaa8b2bc.1322856805.git.nitin.a.kamble@intel.com>
In-Reply-To: <cover.1322856805.git.nitin.a.kamble@intel.com>
From: Nitin A Kamble <nitin.a.kamble@intel.com>
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.
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
---
.../libatomics-ops_fix_for_x32.patch | 41 ++++++++++++++++++++
.../pulseaudio/libatomics-ops_1.2.bb | 5 +-
2 files changed, 44 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-multimedia/pulseaudio/libatomics-ops/libatomics-ops_fix_for_x32.patch
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;
diff --git a/meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb b/meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb
index c84917a..184c167 100644
--- a/meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb
+++ b/meta/recipes-multimedia/pulseaudio/libatomics-ops_1.2.bb
@@ -6,12 +6,13 @@ LICENSE = "GPLv2 & MIT"
LIC_FILES_CHKSUM = "file://doc/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://doc/LICENSING.txt;md5=607073e04548eac7d1f763e480477bab \
"
-PR = "r7"
+PR = "r8"
SRC_URI = "http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-${PV}.tar.gz \
file://fedora/libatomic_ops-1.2-ppclwzfix.patch \
file://gentoo/libatomic_ops-1.2-mips.patch \
- file://doublefix.patch"
+ file://doublefix.patch \
+ file://libatomics-ops_fix_for_x32.patch"
SRC_URI[md5sum] = "1b65e48271c81e3fa2d7a9a69bab7504"
SRC_URI[sha256sum] = "a3d8768aa8fd2f6ae79be2d756b3a6b48816b3889ae906be3d5ffb2de5a5c781"
--
1.7.6.4
next prev parent reply other threads:[~2011-12-02 20:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-02 20:19 [PATCH 00/11] recipe fixes for x32 toolchain nitin.a.kamble
2011-12-02 20:19 ` [PATCH 01/11] gst-fluendo-mpegdemux: rework the CC hack nitin.a.kamble
2011-12-03 17:53 ` Khem Raj
2011-12-05 16:59 ` Kamble, Nitin A
2011-12-02 20:20 ` [PATCH 02/11] mdadm: fix CC definition in the Makefile nitin.a.kamble
2011-12-03 18:08 ` Paul Menzel
2011-12-05 16:58 ` Kamble, Nitin A
2011-12-02 20:20 ` [PATCH 03/11] openssl-1.0.0e: fix to wotk with x32 toolchain nitin.a.kamble
2011-12-02 20:20 ` [PATCH 04/11] gmp: fix the recipe for x32 target nitin.a.kamble
2011-12-02 20:20 ` [PATCH 05/11] mesa-dri, mesa-xlib: fix compilation with x32 toolchain nitin.a.kamble
2011-12-02 20:20 ` [PATCH 06/11] glib-2.0: fix compilatoin " nitin.a.kamble
2011-12-02 20:20 ` [PATCH 07/11] libxt: " nitin.a.kamble
2011-12-02 20:20 ` [PATCH 08/11] liboil: patch source code for x32 nitin.a.kamble
2011-12-02 20:20 ` [PATCH 09/11] xproto: fix compilation with x32 toolchain nitin.a.kamble
2011-12-02 20:20 ` [PATCH 10/11] libaio: patch source code for x32 nitin.a.kamble
2011-12-02 20:20 ` nitin.a.kamble [this message]
2011-12-05 22:47 ` [PATCH 00/11] recipe fixes for x32 toolchain Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6a3108ac14517d67ab0739086666ddcfe025b848.1322856805.git.nitin.a.kamble@intel.com \
--to=nitin.a.kamble@intel.com \
--cc=hjl.tools@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.