Commit 585895ac authored by Raymond Toy's avatar Raymond Toy
Browse files

Pad data block sizes to 16-byte boundary.

Data blocks are padded to double-word boundaries which is 16 bytes for
sparc64.

This also means telling new-genesis round up by 16 bytes in
allocate-descriptor.

Adjust string-to-core for 64-bit objects too.

At this point, the static symbols appear to print out correctly (as
determined by call print (in the lisp monitor).  Some objects, such as
*fp-constant-0d0* however appear to be incorrect.  The value pointer
appears to be a double-float but the object is messed up.  But maybe
this is caused by a buggy print function.
parent c94b80e3
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@
  "Return a descriptor for a block of LENGTH bytes out of SPACE.  The free
  pointer is boosted as necessary.  If any additional memory is needed, we
  vm_allocate it.  The descriptor returned is a pointer of type LOWTAG."
  (let* ((bytes (round-up length #+amd64 16 #-amd64 (ash 1 vm:lowtag-bits)))
  (let* ((bytes (round-up length (* 2 vm:word-bytes)))
	 (offset (space-free-pointer space))
	 (new-free-ptr (+ offset (ash bytes (- vm:word-shift)))))
    (when (> new-free-ptr (space-words-allocated space))
@@ -462,9 +462,12 @@
    (copy-to-system-area bytes (* vm:vector-data-offset
				   ;; the word size of the native backend which
				   ;; may be different from the target backend
				   (if (= (c:backend-fasl-file-implementation
				   (if (or (= (c:backend-fasl-file-implementation
					       c::*native-backend*)
					      #.c:amd64-fasl-file-implementation)
					   (= (c:backend-fasl-file-implementation
					       c::*native-backend*)
					      #.c:sparc64-fasl-file-implementation))
				       64
				       32))
			 (descriptor-sap des)
+3 −2
Original line number Diff line number Diff line
@@ -27,8 +27,9 @@
;;; given a number of words.
;;;
(defmacro pad-data-block (words)
  `(logandc2 (+ (ash ,words word-shift) #+amd64 15 #-amd64 lowtag-mask)
    #+amd64 15 #-amd64 lowtag-mask))
  (let ((dual-word-mask (1- (ash 2 word-shift))))
    `(logandc2 (+ (ash ,words word-shift) ,dual-word-mask)
	       ,dual-word-mask)))

;;; DEFENUM -- Internal Interface.
;;;