X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Fmacros.lisp;h=fe0469b623820ca8b018a55620e70afcae74326e;hb=ee90e535c985f697c71d839083aed16710f846fd;hp=10540ca3ce79b22c051bb81fa5a248a0c6fbf716;hpb=ea3a2433c72ee97c5691c29d882a63e4d86f0a32;p=sbcl.git diff --git a/src/compiler/x86/macros.lisp b/src/compiler/x86/macros.lisp index 10540ca..fe0469b 100644 --- a/src/compiler/x86/macros.lisp +++ b/src/compiler/x86/macros.lisp @@ -46,6 +46,12 @@ `(unless (location= ,n-dst ,n-src) (inst mov ,n-dst ,n-src)))) +(defmacro align-stack-pointer (tn) + #!-darwin (declare (ignore tn)) + #!+darwin + ;; 16 byte alignment. + `(inst and ,tn #xfffffff0)) + (defmacro make-ea-for-object-slot (ptr slot lowtag &optional (size :dword)) `(make-ea ,size :base ,ptr :disp (- (* ,slot n-word-bytes) ,lowtag))) @@ -154,7 +160,8 @@ (make-ea :byte :base ,n-source :disp ,n-offset))) (:big-endian `(inst mov ,n-target - (make-ea :byte :base ,n-source :disp (+ ,n-offset 3))))))) + (make-ea :byte :base ,n-source + :disp (+ ,n-offset (1- n-word-bytes)))))))) ;;;; allocation helpers @@ -273,13 +280,13 @@ ;;; Allocate an other-pointer object of fixed SIZE with a single word ;;; header having the specified WIDETAG value. The result is placed in ;;; RESULT-TN. -(defmacro with-fixed-allocation ((result-tn widetag size &optional inline) +(defmacro with-fixed-allocation ((result-tn widetag size &optional inline stack-allocate-p) &body forms) (unless forms (bug "empty &body in WITH-FIXED-ALLOCATION")) - (once-only ((result-tn result-tn) (size size)) - `(pseudo-atomic - (allocation ,result-tn (pad-data-block ,size) ,inline) + (once-only ((result-tn result-tn) (size size) (stack-allocate-p stack-allocate-p)) + `(maybe-pseudo-atomic ,stack-allocate-p + (allocation ,result-tn (pad-data-block ,size) ,inline ,stack-allocate-p) (storew (logior (ash (1- ,size) n-widetag-bits) ,widetag) ,result-tn) (inst lea ,result-tn