CMUCL commit: src (3 files)

Raymond Toy rtoy at common-lisp.net
Tue Jun 22 18:55:17 CEST 2010


    Date: Tuesday, June 22, 2010 @ 12:55:17
  Author: rtoy
    Path: /project/cmucl/cvsroot/src

Modified: compiler/x86/vm.lisp lisp/Darwin-os.c lisp/Linux-os.c

Make previous changes build for x87.

compiler/x86/vm.lisp:
o Change *float-register-names* to be defparameter.
o Setup float-regs and def-random-reg-tns appropriately for x87 and
  sse2.

lisp/Darwin-os.c:
lisp/Linux-os.c:
o Conditionalize previous change for FEATURE_SSE2.


----------------------+
 compiler/x86/vm.lisp |   16 ++++++++++++++--
 lisp/Darwin-os.c     |    4 +++-
 lisp/Linux-os.c      |    7 +++++--
 3 files changed, 22 insertions(+), 5 deletions(-)


Index: src/compiler/x86/vm.lisp
diff -u src/compiler/x86/vm.lisp:1.16 src/compiler/x86/vm.lisp:1.17
--- src/compiler/x86/vm.lisp:1.16	Tue Jun 22 11:35:23 2010
+++ src/compiler/x86/vm.lisp	Tue Jun 22 12:55:16 2010
@@ -7,7 +7,7 @@
 ;;; Scott Fahlman or slisp-group at cs.cmu.edu.
 ;;;
 (ext:file-comment
- "$Header: /project/cmucl/cvsroot/src/compiler/x86/vm.lisp,v 1.16 2010-06-22 15:35:23 rtoy Exp $")
+ "$Header: /project/cmucl/cvsroot/src/compiler/x86/vm.lisp,v 1.17 2010-06-22 16:55:16 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -96,7 +96,7 @@
 
 ;;; added by jrd
 (eval-when (compile load eval)
-  (defvar *float-register-names* (make-array #-sse2 8 #+sse2 16 :initial-element nil)))
+  (defparameter *float-register-names* (make-array #-sse2 8 #+sse2 16 :initial-element nil)))
 (defreg fr0 0 :float)
 (defreg fr1 1 :float)
 (defreg fr2 2 :float)
@@ -105,6 +105,8 @@
 (defreg fr5 5 :float)
 (defreg fr6 6 :float)
 (defreg fr7 7 :float)
+#+sse2
+(progn
 (defreg xmm0 8 :float)
 (defreg xmm1 9 :float)
 (defreg xmm2 10 :float)
@@ -113,6 +115,12 @@
 (defreg xmm5 13 :float)
 (defreg xmm6 14 :float)
 (defreg xmm7 15 :float)
+)
+
+#-sse2
+(defregset float-regs fr0 fr1 fr2 fr3 fr4 fr5 fr6 fr7)
+
+#+sse2
 (defregset float-regs
     fr0 fr1 fr2 fr3 fr4 fr5 fr6 fr7
     xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7)
@@ -369,6 +377,10 @@
 (def-random-reg-tns byte-reg al ah bl bh cl ch dl dh)
 
 ;; added by jrd
+#-sse2
+(def-random-reg-tns single-reg fr0 fr1 fr2 fr3 fr4 fr5 fr6 fr7)
+
+#+sse2
 (def-random-reg-tns single-reg
     fr0 fr1 fr2 fr3 fr4 fr5 fr6 fr7
     xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7)
Index: src/lisp/Darwin-os.c
diff -u src/lisp/Darwin-os.c:1.29 src/lisp/Darwin-os.c:1.30
--- src/lisp/Darwin-os.c:1.29	Tue Jun 22 11:35:23 2010
+++ src/lisp/Darwin-os.c	Tue Jun 22 12:55:17 2010
@@ -14,7 +14,7 @@
  * Frobbed for OpenBSD by Pierre R. Mai, 2001.
  * Frobbed for Darwin by Pierre R. Mai, 2003.
  *
- * $Header: /project/cmucl/cvsroot/src/lisp/Darwin-os.c,v 1.29 2010-06-22 15:35:23 rtoy Exp $
+ * $Header: /project/cmucl/cvsroot/src/lisp/Darwin-os.c,v 1.30 2010-06-22 16:55:17 rtoy Exp $
  *
  */
 
@@ -285,6 +285,7 @@
 	return (unsigned char *) &scp->uc_mcontext->__fs.__fpu_stmm6;
     case 7:
 	return (unsigned char *) &scp->uc_mcontext->__fs.__fpu_stmm7;
+#ifdef FEATURE_SSE2
     case 8:
 	return (unsigned char *) &scp->uc_mcontext->__fs.__fpu_xmm0;
     case 9:
@@ -301,6 +302,7 @@
 	return (unsigned char *) &scp->uc_mcontext->__fs.__fpu_xmm6;
     case 15:
 	return (unsigned char *) &scp->uc_mcontext->__fs.__fpu_stmm7;
+#endif
     }
     return NULL;
 }
Index: src/lisp/Linux-os.c
diff -u src/lisp/Linux-os.c:1.49 src/lisp/Linux-os.c:1.50
--- src/lisp/Linux-os.c:1.49	Tue Jun 22 11:35:23 2010
+++ src/lisp/Linux-os.c	Tue Jun 22 12:55:17 2010
@@ -15,7 +15,7 @@
  * GENCGC support by Douglas Crosher, 1996, 1997.
  * Alpha support by Julian Dolby, 1999.
  *
- * $Header: /project/cmucl/cvsroot/src/lisp/Linux-os.c,v 1.49 2010-06-22 15:35:23 rtoy Exp $
+ * $Header: /project/cmucl/cvsroot/src/lisp/Linux-os.c,v 1.50 2010-06-22 16:55:17 rtoy Exp $
  *
  */
 
@@ -190,13 +190,16 @@
     if (fpregs) {
         if (offset < 8) {
             reg = (unsigned char *) &fpregs->_st[offset];
-        } else {
+        }
+#ifdef FEATURE_SSE2
+        else {
             struct _fpstate *fpstate;
             fpstate = (struct _fpstate*) scp->uc_mcontext.fpregs;
             if (fpstate->magic != 0xffff) {
                 reg = (unsigned char *) &fpstate->_xmm[offset - 8];
             }
         }
+#endif
     }
     return reg;
 }



More information about the cmucl-commit mailing list