scummvm random work
[patches.git] / glibc-hppa-tighter-atomic-constraints.patch
1 With some code compiled with -fPIC -O1, gcc may use a "register(register)"
2 format when stw can only take "constant(register)" ... so change the
3 constraint to match this requirement.
4
5 2007-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 ); \