boot4.lisp 649 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
;; Allocation macro for PPC to abstract out all allocation.
#+ppc
(in-package "PPC")
(setf lisp::*enable-package-locked-errors* nil)
#+ppc
(defmacro allocation (result-tn size lowtag &key stack-p temp-tn)
  (declare (ignore stack-p temp-tn))
  (let ((alloc-size (gensym)))
    `(let ((,alloc-size ,size))
       (if (logbitp (1- lowtag-bits) ,lowtag)
	   (progn
	     (inst ori ,result-tn alloc-tn ,lowtag))
	   (progn
	     (inst clrrwi ,result-tn alloc-tn lowtag-bits)
	     (inst ori ,result-tn ,result-tn ,lowtag)))
       (if (numberp ,alloc-size)
	   (inst addi alloc-tn alloc-tn ,alloc-size)
	   (inst add alloc-tn alloc-tn ,alloc-size)))))