Skip to content
Snippets Groups Projects
Commit f7fb2b82 authored by rtoy's avatar rtoy
Browse files

Bootstrap file for ppc allocation macro. Don't understand why this is

needed but it helps.
parent 4cd5756a
No related branches found
No related tags found
No related merge requests found
;; 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)))))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment