CMUCL commit: amd64-dd-branch src/compiler/generic (objdef.lisp)

Raymond Toy rtoy at common-lisp.net
Tue Nov 3 16:31:45 CET 2009


    Date: Tuesday, November 3, 2009 @ 10:31:45
  Author: rtoy
    Path: /project/cmucl/cvsroot/src/compiler/generic
     Tag: amd64-dd-branch

Modified: objdef.lisp

o Update object lengths for double-float, complex-double-float,
  double-double-float, and complex-double-double-float.  For amd64,
  the length is 1, not 2, since vm:word-bytes is 8, not 4.
o The filler for double-float, complex-double-float,
  double-double-float, and complex-double-double-float aren't needed
  for amd64 since the header is 8 bytes long, so the objects are
  already aligned on an 8-byte boundary.
o For amd64, need to add a filler between the real and imag parts of a
  complex single-float so that the parts are on 8-byte boundary.


-------------+
 objdef.lisp |   29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)


Index: src/compiler/generic/objdef.lisp
diff -u src/compiler/generic/objdef.lisp:1.61 src/compiler/generic/objdef.lisp:1.61.22.1
--- src/compiler/generic/objdef.lisp:1.61	Wed Feb  6 14:45:26 2008
+++ src/compiler/generic/objdef.lisp	Tue Nov  3 10:31:45 2009
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /project/cmucl/cvsroot/src/compiler/generic/objdef.lisp,v 1.61 2008-02-06 19:45:26 rtoy Rel $")
+  "$Header: /project/cmucl/cvsroot/src/compiler/generic/objdef.lisp,v 1.61.22.1 2009-11-03 15:31:45 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -220,8 +220,8 @@
 
 (define-primitive-object (double-float :lowtag other-pointer-type
 				       :header double-float-type)
-  (filler)
-  (value :c-type "double" :length 2))
+  #-amd64 (filler)
+  (value :c-type "double" :length #.(floor 8 vm:word-bytes)))
 
 #+long-float
 (define-primitive-object (long-float :lowtag other-pointer-type
@@ -522,14 +522,15 @@
 			  :lowtag other-pointer-type
 			  :header complex-single-float-type)
   (real :c-type "float")
+  #+amd64 (filler)
   (imag :c-type "float"))
 
 (define-primitive-object (complex-double-float
 			  :lowtag other-pointer-type
 			  :header complex-double-float-type)
-  (filler)
-  (real :c-type "double" :length 2)
-  (imag :c-type "double" :length 2))
+  #-amd64 (filler)
+  (real :c-type "double" :length #.(floor 8 vm:word-bytes))
+  (imag :c-type "double" :length #.(floor 8 vm:word-bytes)))
 
 #+long-float
 (define-primitive-object (complex-long-float
@@ -543,16 +544,16 @@
 (define-primitive-object (double-double-float
 			  :lowtag other-pointer-type
 			  :header double-double-float-type)
-  (filler)
-  (hi :c-type "double" :length 2)
-  (lo :c-type "double" :length 2))
+  #-amd64 (filler)
+  (hi :c-type "double" :length #.(floor 8 vm:word-bytes))
+  (lo :c-type "double" :length #.(floor 8 vm:word-bytes)))
 
 #+double-double
 (define-primitive-object (complex-double-double-float
 			  :lowtag other-pointer-type
 			  :header complex-double-double-float-type)
-  (filler)
-  (real-hi :c-type "double" :length 2)
-  (real-lo :c-type "double" :length 2)
-  (imag-hi :c-type "double" :length 2)
-  (imag-lo :c-type "double" :length 2))
+  #-amd64 (filler)
+  (real-hi :c-type "double" :length #.(floor 8 vm:word-bytes))
+  (real-lo :c-type "double" :length #.(floor 8 vm:word-bytes))
+  (imag-hi :c-type "double" :length #.(floor 8 vm:word-bytes))
+  (imag-lo :c-type "double" :length #.(floor 8 vm:word-bytes)))



More information about the cmucl-commit mailing list