mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-04 09:09:56 +00:00
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:
parent
e602d31e02
commit
30fd0561cd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8521
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user