summaryrefslogtreecommitdiff
path: root/sys/arch/i386/stand
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>1999-01-31 14:56:02 +0000
committerMarc Espie <espie@cvs.openbsd.org>1999-01-31 14:56:02 +0000
commitc2ae597a496a66466fb1cd1fb02d5d450e3b06a8 (patch)
tree8da2c08f5a970c698efdcaa487d13cea5bc07a05 /sys/arch/i386/stand
parentfd89b8127a42f7f1e8364d5b93d3f95a23fe1f59 (diff)
Fix clobbers so that GENERIC may compile with egcs.
Historically, the documentation of extended asm was lacking, namely you should NOT specify the same register as an input, and a clobber. If the register is clobbered, it should be specified as an output as well, e.g., by linking input and output through the "number" notation. (Beware of lvalues, some local variables needed...) In older versions, up-to egcs1.1.1, the compiler did not even warn about it, but it was liable to output bad code. Newer egcs are pickier and simply refuse to swallow such code.
Diffstat (limited to 'sys/arch/i386/stand')
-rw-r--r--sys/arch/i386/stand/libsa/pciprobe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/i386/stand/libsa/pciprobe.c b/sys/arch/i386/stand/libsa/pciprobe.c
index 7ba6d2cda55..bef46384944 100644
--- a/sys/arch/i386/stand/libsa/pciprobe.c
+++ b/sys/arch/i386/stand/libsa/pciprobe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pciprobe.c,v 1.1 1998/02/24 22:07:46 weingart Exp $ */
+/* $OpenBSD: pciprobe.c,v 1.2 1999/01/31 14:56:01 espie Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -50,8 +50,8 @@ pciprobe()
__asm __volatile(DOINT(0x1A) ";shll $8,%2; setc %b2"
: "=a" (hw_chars), "=b" (rev), "=c" (rc),
"=d" (sig), "=D" (entry32)
- : "0" (0xB101), "D" (0x0)
- : "cc", "eax", "ebx", "ecx", "edx");
+ : "0" (0xB101), "4" (0x0)
+ : "cc");
if (rc & 0xff00 || hw_chars & 0xff00)
return;