From 30fd0561cd5616d1ecee51a49efba233f6a134fb Mon Sep 17 00:00:00 2001 From: David Greenman Date: Sun, 14 May 1995 22:25:11 +0000 Subject: [PATCH] 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 --- sys/amd64/include/cpufunc.h | 4 ++-- 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 3e60a08e10d..a57dc9d40ca 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 3e60a08e10d..a57dc9d40ca 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); }