mit-scheme-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MIT-Scheme-users] SIGILL, Illegal instruction


From: Chris Hanson
Subject: [MIT-Scheme-users] SIGILL, Illegal instruction
Date: Fri, 31 Oct 2003 21:01:05 -0500
User-agent: IMAIL/1.20; Edwin/3.114; MIT-Scheme/7.7.90

   Date: 31 Oct 2003 15:24:09 -0600
   From: Elizabeth Barham <address@hidden>

      Do you have a patch? That way I could just make the new version and
   use it on that particular machine as it may be some time before the
   patch makes its way into Debian.

Here you go.  I can update the Debian package and upload later
tonight.  If you track unstable you'll have it tomorrow.



RCS file: /cvsroot/mit-scheme/mit-scheme/v7/src/microcode/cmpauxmd/i386.m4,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -b -u -r1.62 -r1.63
--- i386.m4     17 May 2003 20:55:45 -0000      1.62
+++ i386.m4     31 Oct 2003 20:45:35 -0000      1.63
@@ -1,6 +1,6 @@
 ### -*-Midas-*-
 ###
-### $Id: i386.m4,v 1.62 2003/05/17 20:55:45 cph Exp $
+### $Id: i386.m4,v 1.63 2003/10/31 20:45:35 cph Exp $
 ###
 ### Copyright 1992,1997,1998,2000,2001 Massachusetts Institute of Technology
 ### Copyright 2002,2003 Massachusetts Institute of Technology
@@ -389,11 +389,14 @@
        OP(mov,l)       TW(REG(eax),ABS(EVR(i387_presence)))
 
 # Do a bunch of hair to determine if we need to do cache synchronization.
-# First, test to see if the CPUID instruction is supported.
+# See if the CPUID instruction is supported.
 
        OP(xor,l)       TW(REG(eax),REG(eax))
        OP(mov,l)       TW(REG(eax),ABS(EVR(ia32_cpuid_supported)))
        OP(mov,l)       TW(REG(eax),ABS(EVR(ia32_cpuid_needed)))
+
+# First test: can we toggle the AC bit?
+
        pushfd
        OP(pop,l)       REG(eax)
        OP(mov,l)       TW(REG(eax),REG(ecx))
@@ -402,12 +405,28 @@
        popfd
        pushfd
        OP(pop,l)       REG(eax)
+
+# if AC bit can't be toggled, this is a 386 (and doesn't support CPUID).
+
        OP(xor,l)       TW(REG(ecx),REG(eax))
        jz              no_cpuid_instr
+       OP(push,l)      REG(ecx)                        # restore EFLAGS
+       popfd
 
-# Restore original EFLAGS.
+# Now test to see if the ID bit can be toggled.
 
-       OP(push,l)      REG(ecx)
+       OP(mov,l)       TW(REG(ecx),REG(eax))
+       OP(xor,l)       TW(IMM(HEX(00200000)),REG(eax))
+       OP(push,l)      REG(eax)
+       popfd
+       pushfd
+       OP(pop,l)       REG(eax)
+
+# if ID bit can't be toggled, this is a 486 that doesn't support CPUID.
+
+       OP(xor,l)       TW(REG(ecx),REG(eax))
+       jz              no_cpuid_instr
+       OP(push,l)      REG(ecx)                        # restore EFLAGS
        popfd
 
 # Now we know that cpuid is supported.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]