summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2010-05-02 22:26:59 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2010-05-02 22:26:59 +0000
commit463582c1d2af352c0fc668f518d76a4291997276 (patch)
treef1a5d8e710bccd1c64920bd700a3b66f183410c5 /sys/arch/i386
parent7494a552c9857ea80aecb9e1bb2b22e09a59c2af (diff)
The Cyrix "coma bug" workaround code has a really convoluted way to write 0
into a magic register. Simplify the code by making this explicit, but keep the dummy read just in case this has a magic side-effect. And yes, as far as I can tell, writing 0 is really what was intended here. Makes gcc4 happy. No binary change with gcc3. ok jsg@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/machdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index 1b8e2d8959d..dc2f970d364 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.469 2010/03/21 23:00:57 jsg Exp $ */
+/* $OpenBSD: machdep.c,v 1.470 2010/05/02 22:26:58 kettenis Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -1239,7 +1239,7 @@ cyrix6x86_cpu_setup(struct cpu_info *ci)
/* cyrix's workaround for the "coma bug" */
cyrix_write_reg(0x31, cyrix_read_reg(0x31) | 0xf8);
cyrix_write_reg(0x32, cyrix_read_reg(0x32) | 0x7f);
- cyrix_write_reg(0x33, cyrix_read_reg(0x33) & ~0xff);
+ cyrix_read_reg(0x33); cyrix_write_reg(0x33, 0);
cyrix_write_reg(0x3c, cyrix_read_reg(0x3c) | 0x87);
/* disable access to ccr4/ccr5 */
cyrix_write_reg(0xC3, cyrix_read_reg(0xC3) & ~0x10);