X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fmips%2Fmacros.lisp;h=9e09443e612f4341fb019f631b684e696e23e33b;hb=b28aadc5bd34a0d9fa0ff15c52b2b4164d955831;hp=dd32fdcc226f084e2030c54550d0732d57d77df1;hpb=481348f2f96f364374f669786f9fc61348decabc;p=sbcl.git diff --git a/src/compiler/mips/macros.lisp b/src/compiler/mips/macros.lisp index dd32fdc..9e09443 100644 --- a/src/compiler/mips/macros.lisp +++ b/src/compiler/mips/macros.lisp @@ -153,6 +153,16 @@ (storew ,temp-tn ,result-tn 0 other-pointer-lowtag) ,@body))) +(defun align-csp (temp) + ;; is used for stack allocation of dynamic-extent objects + (let ((aligned (gen-label))) + (inst and temp csp-tn lowtag-mask) + (inst beq temp aligned) + (inst nop) + (inst addu csp-tn n-word-bytes) + (storew zero-tn csp-tn -1) + (emit-label aligned))) + ;;;; Three Way Comparison (defun three-way-comparison (x y condition flavor not-p target temp) @@ -190,7 +200,7 @@ `((let ((vop ,vop)) (when vop (note-this-location vop :internal-error))) - (inst break ,kind) + (inst break 0 ,kind) (with-adjustable-vector (,vector) (write-var-integer (error-number-or-lose ',code) ,vector) ,@(mapcar #'(lambda (tn) @@ -215,8 +225,9 @@ "Cause a continuable error. If the error is continued, execution resumes at LABEL." `(progn - (inst b ,label) - ,@(emit-error-break vop cerror-trap error-code values))) + (without-scheduling () + (inst b ,label) + ,@(emit-error-break vop cerror-trap error-code values)))) (defmacro generate-error-code (vop error-code &rest values) "Generate-Error-Code Error-code Value* @@ -256,7 +267,7 @@ (let ((label (gen-label))) (inst bgez ,flag-tn label) (inst addu alloc-tn (1- ,extra)) - (inst break 16) + (inst break 0 16) (emit-label label))))) ;;;; memory accessor vop generators @@ -285,9 +296,8 @@ (:results (value :scs ,scs)) (:result-types ,el-type) (:generator 5 - (inst add lip object index) - (inst lw value lip (- (* ,offset n-word-bytes) ,lowtag)) - (inst nop))) + (inst addu lip object index) + (loadw value lip ,offset ,lowtag))) (define-vop (,(symbolicate name "-C")) ,@(when translate `((:translate ,translate))) @@ -300,8 +310,7 @@ (:results (value :scs ,scs)) (:result-types ,el-type) (:generator 4 - (inst lw value object (- (* (+ ,offset index) n-word-bytes) ,lowtag)) - (inst nop))))) + (loadw value object (+ ,offset index) ,lowtag))))) (defmacro define-full-setter (name type offset lowtag scs el-type &optional translate) @@ -318,8 +327,8 @@ (:results (result :scs ,scs)) (:result-types ,el-type) (:generator 2 - (inst add lip object index) - (inst sw value lip (- (* ,offset n-word-bytes) ,lowtag)) + (inst addu lip object index) + (storew value lip ,offset ,lowtag) (move result value))) (define-vop (,(symbolicate name "-C")) ,@(when translate @@ -335,7 +344,7 @@ (:results (result :scs ,scs)) (:result-types ,el-type) (:generator 1 - (inst sw value object (- (* (+ ,offset index) n-word-bytes) ,lowtag)) + (storew value object (+ ,offset index) ,lowtag) (move result value)))))