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
This commit is contained in:
David Greenman 1995-05-14 22:25:11 +00:00
parent e602d31e02
commit 30fd0561cd
2 changed files with 4 additions and 4 deletions

View File

@ -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);
}

View File

@ -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);
}