diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-04-25 19:14:59 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-04-25 19:14:59 +0000 |
commit | 129f45e705f0c09f0545b5f130a37cbd0fd5bf74 (patch) | |
tree | 90da39abda1a245d0dee3d15815e2526ccfdc6eb /sys/arch/alpha/include | |
parent | 394ec8e94f426c5c3ebfd7dbbd98f7f1b4d2227d (diff) |
Strengthen the constraints of the atomic operations assembly statements
to make sure the register holding the ld_l and st_c addresses doesn't
get reused when gcc's register allocator is too aggressive.
Diffstat (limited to 'sys/arch/alpha/include')
-rw-r--r-- | sys/arch/alpha/include/atomic.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sys/arch/alpha/include/atomic.h b/sys/arch/alpha/include/atomic.h index ac7df644cf8..9289e6b58a0 100644 --- a/sys/arch/alpha/include/atomic.h +++ b/sys/arch/alpha/include/atomic.h @@ -1,4 +1,4 @@ -/* $OpenBSD: atomic.h,v 1.7 2008/06/26 05:42:08 ray Exp $ */ +/* $OpenBSD: atomic.h,v 1.8 2009/04/25 19:14:58 miod Exp $ */ /* $NetBSD: atomic.h,v 1.7 2001/12/17 23:34:57 thorpej Exp $ */ /*- @@ -61,8 +61,8 @@ atomic_setbits_ulong(__volatile unsigned long *ulp, unsigned long v) "2: br 1b \n" "3: \n" " # END atomic_setbits_ulong" - : "=&r" (t0), "=m" (*ulp) - : "r" (v), "m" (*ulp) + : "=&r" (t0), "+m" (*ulp) + : "r" (v), "1" (*ulp) : "memory"); } @@ -87,8 +87,8 @@ atomic_clearbits_ulong(__volatile unsigned long *ulp, unsigned long v) "2: br 1b \n" "3: \n" " # END atomic_clearbits_ulong" - : "=&r" (t0), "=m" (*ulp) - : "r" (~v), "m" (*ulp) + : "=&r" (t0), "+m" (*ulp) + : "r" (~v), "1" (*ulp) : "memory"); } @@ -113,8 +113,8 @@ atomic_add_ulong(__volatile unsigned long *ulp, unsigned long v) "2: br 1b \n" "3: \n" " # END atomic_add_ulong" - : "=&r" (t0), "=m" (*ulp) - : "r" (v), "m" (*ulp) + : "=&r" (t0), "+m" (*ulp) + : "r" (v), "1" (*ulp) : "memory"); } @@ -139,8 +139,8 @@ atomic_sub_ulong(__volatile unsigned long *ulp, unsigned long v) "2: br 1b \n" "3: \n" " # END atomic_sub_ulong" - : "=&r" (t0), "=m" (*ulp) - : "r" (v), "m" (*ulp) + : "=&r" (t0), "+m" (*ulp) + : "r" (v), "1" (*ulp) : "memory"); } @@ -165,8 +165,8 @@ atomic_loadlatch_ulong(__volatile unsigned long *ulp, unsigned long v) "2: br 1b \n" "3: \n" " # END atomic_loadlatch_ulong" - : "=&r" (t0), "=r" (v0), "=m" (*ulp) - : "r" (v), "m" (*ulp) + : "=&r" (t0), "=r" (v0), "+m" (*ulp) + : "r" (v), "2" (*ulp) : "memory"); return (v0); @@ -193,8 +193,8 @@ atomic_setbits_int(__volatile unsigned int *uip, unsigned int v) "2: br 1b \n" "3: \n" " # END atomic_setbits_int" - : "=&r" (t0), "=m" (*uip) - : "r" (v), "m" (*uip) + : "=&r" (t0), "+m" (*uip) + : "r" (v), "1" (*uip) : "memory"); } @@ -219,8 +219,8 @@ atomic_clearbits_int(__volatile unsigned int *uip, unsigned int v) "2: br 1b \n" "3: \n" " # END atomic_clearbits_int" - : "=&r" (t0), "=m" (*uip) - : "r" (~v), "m" (*uip) + : "=&r" (t0), "+m" (*uip) + : "r" (~v), "1" (*uip) : "memory"); } |