X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcompiler%2Fppc%2Fmacros.lisp;h=645c566cc093cba600394ffd82b4c4f2ce0848dd;hb=5d3a728a1d9a91e7218fe53f12f96ab63b846810;hp=262cc10218a52b51af89344cad4bce6bceb312f3;hpb=37d3828773e2f847bb1ed7522b0af4fb8e736fc8;p=sbcl.git diff --git a/src/compiler/ppc/macros.lisp b/src/compiler/ppc/macros.lisp index 262cc10..645c566 100644 --- a/src/compiler/ppc/macros.lisp +++ b/src/compiler/ppc/macros.lisp @@ -265,7 +265,8 @@ (inst ori ,result-tn ,result-tn ,lowtag))) (defmacro with-fixed-allocation ((result-tn flag-tn temp-tn type-code size - &key (lowtag other-pointer-lowtag)) + &key (lowtag other-pointer-lowtag) + stack-allocate-p) &body body) "Do stuff to allocate an other-pointer object of fixed Size with a single word header having the specified Type-Code. The result is placed in @@ -275,9 +276,14 @@ (once-only ((result-tn result-tn) (temp-tn temp-tn) (flag-tn flag-tn) (type-code type-code) (size size) (lowtag lowtag)) `(pseudo-atomic (,flag-tn) - (allocation ,result-tn (pad-data-block ,size) ,lowtag - :temp-tn ,temp-tn - :flag-tn ,flag-tn) + (if ,stack-allocate-p + (progn + (align-csp ,temp-tn) + (inst ori ,result-tn csp-tn ,lowtag) + (inst addi csp-tn csp-tn (pad-data-block ,size))) + (allocation ,result-tn (pad-data-block ,size) ,lowtag + :temp-tn ,temp-tn + :flag-tn ,flag-tn)) (when ,type-code (inst lr ,temp-tn (logior (ash (1- ,size) n-widetag-bits) ,type-code)) (storew ,temp-tn ,result-tn 0 ,lowtag)) @@ -376,4 +382,5 @@ garbage collection. This is currently implemented by disabling GC" ,@body) #!+gencgc `(let ((*pinned-objects* (list* ,@objects *pinned-objects*))) + (declare (truly-dynamic-extent *pinned-objects*)) ,@body))