diff options
author | bde <bde@FreeBSD.org> | 1999-01-09 13:07:18 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1999-01-09 13:07:18 +0000 |
commit | 97a75ce74241ef194ab458a10d1e24e1de0e27cf (patch) | |
tree | 5cc0596dda2196114b55358ed694ac2b3b61d7ae /sys | |
parent | cea612c7820bfb144a3e6e478758d7163d4a293b (diff) | |
download | FreeBSD-src-97a75ce74241ef194ab458a10d1e24e1de0e27cf.zip FreeBSD-src-97a75ce74241ef194ab458a10d1e24e1de0e27cf.tar.gz |
Don't put operands in clobber lists, since this is dubious for old
versions of gcc and broken for current versions of egcs.
Cleaned up the asm statement for do_cpuid() a little.
Submitted by: "John S. Dyson" <dyson@iquest.net> but rewritten by me
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/identcpu.c | 16 | ||||
-rw-r--r-- | sys/i386/i386/identcpu.c | 16 |
2 files changed, 16 insertions, 16 deletions
diff --git a/sys/amd64/amd64/identcpu.c b/sys/amd64/amd64/identcpu.c index f5a1ead..f962882 100644 --- a/sys/amd64/amd64/identcpu.c +++ b/sys/amd64/amd64/identcpu.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp - * $Id: identcpu.c,v 1.54 1998/12/27 23:23:26 msmith Exp $ + * $Id: identcpu.c,v 1.55 1999/01/08 16:29:56 bde Exp $ */ #include "opt_cpu.h" @@ -106,13 +106,13 @@ do_cpuid(u_int ax, u_int *p) { __asm __volatile( ".byte 0x0f, 0xa2;" - "movl %%eax, (%%esi);" - "movl %%ebx, (4)(%%esi);" - "movl %%ecx, (8)(%%esi);" - "movl %%edx, (12)(%%esi);" - : - : "a" (ax), "S" (p) - : "ax", "bx", "cx", "dx" + "movl %%eax, (%2);" + "movl %%ebx, 4(%2);" + "movl %%ecx, 8(%2);" + "movl %%edx, 12(%2);" + : "=a" (ax) + : "0" (ax), "S" (p) + : "bx", "cx", "dx" ); } diff --git a/sys/i386/i386/identcpu.c b/sys/i386/i386/identcpu.c index f5a1ead..f962882 100644 --- a/sys/i386/i386/identcpu.c +++ b/sys/i386/i386/identcpu.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp - * $Id: identcpu.c,v 1.54 1998/12/27 23:23:26 msmith Exp $ + * $Id: identcpu.c,v 1.55 1999/01/08 16:29:56 bde Exp $ */ #include "opt_cpu.h" @@ -106,13 +106,13 @@ do_cpuid(u_int ax, u_int *p) { __asm __volatile( ".byte 0x0f, 0xa2;" - "movl %%eax, (%%esi);" - "movl %%ebx, (4)(%%esi);" - "movl %%ecx, (8)(%%esi);" - "movl %%edx, (12)(%%esi);" - : - : "a" (ax), "S" (p) - : "ax", "bx", "cx", "dx" + "movl %%eax, (%2);" + "movl %%ebx, 4(%2);" + "movl %%ecx, 8(%2);" + "movl %%edx, 12(%2);" + : "=a" (ax) + : "0" (ax), "S" (p) + : "bx", "cx", "dx" ); } |