diff options
author | dg <dg@FreeBSD.org> | 1995-05-14 22:25:11 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-05-14 22:25:11 +0000 |
commit | b6c456d4ddb5cae8aceeb655e46d94a99d682511 (patch) | |
tree | 3967ee301f2551f3352a50ba7309638e7ca0df71 /sys | |
parent | eb9f4c619d9bdab72fe77bdb117f664d876e3678 (diff) | |
download | FreeBSD-src-b6c456d4ddb5cae8aceeb655e46d94a99d682511.zip FreeBSD-src-b6c456d4ddb5cae8aceeb655e46d94a99d682511.tar.gz |
Added apersand constraint to make sure that the source and destination
registers aren't combined.
Reviewed by: Bruce Evans and David Greenman
Submitted by: John Dyson
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/include/cpufunc.h | 4 | ||||
-rw-r--r-- | sys/i386/include/cpufunc.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index 3e60a08..a57dc9d 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cpufunc.h,v 1.34 1995/03/03 22:14:42 davidg Exp $ + * $Id: cpufunc.h,v 1.35 1995/05/11 07:24:35 bde Exp $ */ /* @@ -195,7 +195,7 @@ loadandclear(u_int *addr) u_int result; __asm __volatile("xorl %0,%0; xchgl %1,%0" - : "=r" (result) : "m" (*addr)); + : "=&r" (result) : "m" (*addr)); return (result); } diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index 3e60a08..a57dc9d 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cpufunc.h,v 1.34 1995/03/03 22:14:42 davidg Exp $ + * $Id: cpufunc.h,v 1.35 1995/05/11 07:24:35 bde Exp $ */ /* @@ -195,7 +195,7 @@ loadandclear(u_int *addr) u_int result; __asm __volatile("xorl %0,%0; xchgl %1,%0" - : "=r" (result) : "m" (*addr)); + : "=&r" (result) : "m" (*addr)); return (result); } |