[movitz-cvs] CVS update: movitz/losp/muerte/cpu-id.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Sat Aug 14 17:55:29 UTC 2004


Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory common-lisp.net:/tmp/cvs-serv18049

Modified Files:
	cpu-id.lisp 
Log Message:
Fix eflags to observe stack and register discipline.

Date: Sat Aug 14 10:55:29 2004
Author: ffjeld

Index: movitz/losp/muerte/cpu-id.lisp
diff -u movitz/losp/muerte/cpu-id.lisp:1.8 movitz/losp/muerte/cpu-id.lisp:1.9
--- movitz/losp/muerte/cpu-id.lisp:1.8	Thu Aug 12 08:42:59 2004
+++ movitz/losp/muerte/cpu-id.lisp	Sat Aug 14 10:55:29 2004
@@ -10,7 +10,7 @@
 ;;;; Author:        Frode Vatvedt Fjeld <frodef at acm.org>
 ;;;; Created at:    Mon Apr 15 22:47:13 2002
 ;;;;                
-;;;; $Id: cpu-id.lisp,v 1.8 2004/08/12 15:42:59 ffjeld Exp $
+;;;; $Id: cpu-id.lisp,v 1.9 2004/08/14 17:55:29 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -215,11 +215,10 @@
     (:wrmsr)))
 
 (define-compiler-macro eflags ()
-  `(with-inline-assembly (:returns :register)
-     ;; XXXXX Breaks stack and register disciplines!
+  `(with-inline-assembly (:returns :untagged-fixnum-ecx)
+     (:clc)				; Ensure lower 2 bits are zero..
      (:pushfl)
-     (:popl (:result-register))
-     (:shll 2 (:result-register))))
+     (:popl :ecx)))
 
 (defun eflags ()
   (eflags))





More information about the Movitz-cvs mailing list