1 |
vapier 12/02/01 20:53:48 |
2 |
|
3 |
Added: libatomic_ops-7.2_alpha4-x32.patch |
4 |
Log: |
5 |
Version bump #353240 by Kevin Bowling. |
6 |
|
7 |
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-libs/libatomic_ops/files/libatomic_ops-7.2_alpha4-x32.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libatomic_ops/files/libatomic_ops-7.2_alpha4-x32.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libatomic_ops/files/libatomic_ops-7.2_alpha4-x32.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: libatomic_ops-7.2_alpha4-x32.patch |
16 |
=================================================================== |
17 |
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=e3a384578f677c05d812d99c2c92aa13670bd06a |
18 |
|
19 |
Upstream-Status: Pending |
20 |
|
21 |
Remove the `q' suffix on x86-64 atomic instructions. |
22 |
|
23 |
We don't need the `q' suffix on x86_64 atomic instructions for AO_t, |
24 |
which is defined as "unsigned long". "unsigned long" is 32bit for x32 |
25 |
and 64bit for x86-64. The register operand in x86-64 atomic instructions |
26 |
is sufficient to properly determine the register size. |
27 |
|
28 |
Received this patch from H.J. Lu <hjl.tools@×××××.com> |
29 |
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@×××××.com> 2011/12/02 |
30 |
|
31 |
--- a/src/atomic_ops/sysdeps/gcc/x86_64.h |
32 |
+++ b/src/atomic_ops/sysdeps/gcc/x86_64.h |
33 |
@@ -56,7 +56,7 @@ AO_fetch_and_add_full (volatile AO_t *p, |
34 |
{ |
35 |
AO_t result; |
36 |
|
37 |
- __asm__ __volatile__ ("lock; xaddq %0, %1" : |
38 |
+ __asm__ __volatile__ ("lock; xadd %0, %1" : |
39 |
"=r" (result), "=m" (*p) : "0" (incr), "m" (*p) |
40 |
: "memory"); |
41 |
return result; |
42 |
@@ -106,7 +106,7 @@ AO_int_fetch_and_add_full (volatile unsi |
43 |
AO_INLINE void |
44 |
AO_or_full (volatile AO_t *p, AO_t incr) |
45 |
{ |
46 |
- __asm__ __volatile__ ("lock; orq %1, %0" : |
47 |
+ __asm__ __volatile__ ("lock; or %1, %0" : |
48 |
"=m" (*p) : "r" (incr), "m" (*p) : "memory"); |
49 |
} |
50 |
|
51 |
@@ -131,7 +131,7 @@ AO_compare_and_swap_full(volatile AO_t * |
52 |
AO_t old, AO_t new_val) |
53 |
{ |
54 |
char result; |
55 |
- __asm__ __volatile__("lock; cmpxchgq %3, %0; setz %1" |
56 |
+ __asm__ __volatile__("lock; cmpxchg %3, %0; setz %1" |
57 |
: "=m"(*addr), "=q"(result) |
58 |
: "m"(*addr), "r" (new_val), "a"(old) : "memory"); |
59 |
return (int) result; |