Author: kib Date: Sat Jan 1 08:47:38 2011 New Revision: 216869 URL: http://svn.freebsd.org/changeset/base/216869
Log: MFC r216524: Inform a compiler which asm statements in the x86 implementation of atomics change eflags. Modified: stable/8/sys/amd64/include/atomic.h stable/8/sys/i386/include/atomic.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/amd64/include/atomic.h ============================================================================== --- stable/8/sys/amd64/include/atomic.h Sat Jan 1 07:23:06 2011 (r216868) +++ stable/8/sys/amd64/include/atomic.h Sat Jan 1 08:47:38 2011 (r216869) @@ -108,7 +108,8 @@ atomic_##NAME##_##TYPE(volatile u_##TYPE { \ __asm __volatile(MPLOCKED OP \ : "=m" (*p) \ - : CONS (V), "m" (*p)); \ + : CONS (V), "m" (*p) \ + : "cc"); \ } \ \ static __inline void \ @@ -117,7 +118,7 @@ atomic_##NAME##_barr_##TYPE(volatile u_# __asm __volatile(MPLOCKED OP \ : "=m" (*p) \ : CONS (V), "m" (*p) \ - : "memory"); \ + : "memory", "cc"); \ } \ struct __hack @@ -145,7 +146,7 @@ atomic_cmpset_int(volatile u_int *dst, u : "r" (src), /* 2 */ "a" (exp), /* 3 */ "m" (*dst) /* 4 */ - : "memory"); + : "memory", "cc"); return (res); } @@ -166,7 +167,7 @@ atomic_cmpset_long(volatile u_long *dst, : "r" (src), /* 2 */ "a" (exp), /* 3 */ "m" (*dst) /* 4 */ - : "memory"); + : "memory", "cc"); return (res); } @@ -185,8 +186,8 @@ atomic_fetchadd_int(volatile u_int *p, u "# atomic_fetchadd_int" : "+r" (v), /* 0 (result) */ "=m" (*p) /* 1 */ - : "m" (*p)); /* 2 */ - + : "m" (*p) /* 2 */ + : "cc"); return (v); } @@ -204,8 +205,8 @@ atomic_fetchadd_long(volatile u_long *p, "# atomic_fetchadd_long" : "+r" (v), /* 0 (result) */ "=m" (*p) /* 1 */ - : "m" (*p)); /* 2 */ - + : "m" (*p) /* 2 */ + : "cc"); return (v); } @@ -249,7 +250,7 @@ atomic_load_acq_##TYPE(volatile u_##TYPE : "=a" (res), /* 0 */ \ "=m" (*p) /* 1 */ \ : "m" (*p) /* 2 */ \ - : "memory"); \ + : "memory", "cc"); \ \ return (res); \ } \ Modified: stable/8/sys/i386/include/atomic.h ============================================================================== --- stable/8/sys/i386/include/atomic.h Sat Jan 1 07:23:06 2011 (r216868) +++ stable/8/sys/i386/include/atomic.h Sat Jan 1 08:47:38 2011 (r216869) @@ -106,7 +106,8 @@ atomic_##NAME##_##TYPE(volatile u_##TYPE { \ __asm __volatile(MPLOCKED OP \ : "=m" (*p) \ - : CONS (V), "m" (*p)); \ + : CONS (V), "m" (*p) \ + : "cc"); \ } \ \ static __inline void \ @@ -115,7 +116,7 @@ atomic_##NAME##_barr_##TYPE(volatile u_# __asm __volatile(MPLOCKED OP \ : "=m" (*p) \ : CONS (V), "m" (*p) \ - : "memory"); \ + : "memory", "cc"); \ } \ struct __hack @@ -172,7 +173,7 @@ atomic_cmpset_int(volatile u_int *dst, u : "r" (src), /* 2 */ "a" (exp), /* 3 */ "m" (*dst) /* 4 */ - : "memory"); + : "memory", "cc"); return (res); } @@ -193,8 +194,8 @@ atomic_fetchadd_int(volatile u_int *p, u "# atomic_fetchadd_int" : "+r" (v), /* 0 (result) */ "=m" (*p) /* 1 */ - : "m" (*p)); /* 2 */ - + : "m" (*p) /* 2 */ + : "cc"); return (v); } @@ -238,7 +239,7 @@ atomic_load_acq_##TYPE(volatile u_##TYPE : "=a" (res), /* 0 */ \ "=m" (*p) /* 1 */ \ : "m" (*p) /* 2 */ \ - : "memory"); \ + : "memory", "cc"); \ \ return (res); \ } \ _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"