]> git.wh0rd.org - patches.git/blame_incremental - glibc-hppa-tighter-atomic-constraints.patch
initial import
[patches.git] / glibc-hppa-tighter-atomic-constraints.patch
... / ...
CommitLineData
1With some code compiled with -fPIC -O1, gcc may use a "register(register)"
2format when stw can only take "constant(register)" ... so change the
3constraint to match this requirement.
4
52007-02-10 Mike Frysinger <vapier@gentoo.org>
6
7 * sysdeps/unix/sysv/linux/hppa/bits/atomic.h
8 (atomic_compare_and_exchange_val_acq): Change `m' constraint to an
9 `o' memory constraint for first two input operands.
10
11--- ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
12+++ ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
13@@ -76,7 +76,7 @@ typedef uintmax_t uatomic_max_t;
14 "stw %%r28, %0 \n\t" \
15 "sub %%r0, %%r21, %%r21 \n\t" \
16 "stw %%r21, %1 \n\t" \
17- : "=m" (lws_ret), "=m" (lws_errno), "=m" (*mem) \
18+ : "=o" (lws_ret), "=o" (lws_errno), "=m" (*mem) \
19 : "r" (mem), "r" (oldval), "r" (newval) \
20 : LWS_CLOBBER \
21 ); \