X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcompiler%2Fx86-64%2Fc-call.lisp;h=fe5502b5e63c70a62f5e650f7915868b6fba5cfe;hb=69ef68ba7393e3492c1b4a756d1140f71c2922bc;hp=05235bacdb719598a767aedf1b74202f312bfde9;hpb=dcb7dbc4a93f413d7ce2cd0d05e13c2a7e785e79;p=sbcl.git diff --git a/src/compiler/x86-64/c-call.lisp b/src/compiler/x86-64/c-call.lisp index 05235ba..fe5502b 100644 --- a/src/compiler/x86-64/c-call.lisp +++ b/src/compiler/x86-64/c-call.lisp @@ -219,7 +219,7 @@ (:results (res :scs (sap-reg))) (:result-types system-area-pointer) (:generator 2 - (inst lea res (make-fixup (extern-alien-name foreign-symbol) :foreign)))) + (inst lea res (make-fixup foreign-symbol :foreign)))) #!+linkage-table (define-vop (foreign-symbol-dataref-address) @@ -231,15 +231,13 @@ (:results (res :scs (sap-reg))) (:result-types system-area-pointer) (:generator 2 - (inst mov res (make-fixup (extern-alien-name foreign-symbol) :foreign-dataref)))) + (inst mov res (make-fixup foreign-symbol :foreign-dataref)))) (define-vop (call-out) (:args (function :scs (sap-reg)) (args :more t)) (:results (results :more t)) (:temporary (:sc unsigned-reg :offset rax-offset :to :result) rax) - (:temporary (:sc unsigned-reg :offset rcx-offset - :from :eval :to :result) rcx) (:ignore results) (:vop-var vop) (:save-p t) @@ -255,11 +253,10 @@ ;; To give the debugger a clue. XX not really internal-error? (note-this-location vop :internal-error) ;; FLOAT15 needs to contain FP zero in Lispland - (inst xor rcx rcx) - (inst movd (make-random-tn :kind :normal + (let ((float15 (make-random-tn :kind :normal :sc (sc-or-lose 'double-reg) - :offset float15-offset) - rcx))) + :offset float15-offset))) + (inst xorpd float15 float15)))) (define-vop (alloc-number-stack-space) (:info amount) @@ -267,15 +264,17 @@ (:generator 0 (aver (location= result rsp-tn)) (unless (zerop amount) - (let ((delta (logandc2 (+ amount 3) 3))) + (let ((delta (logandc2 (+ amount 7) 7))) (inst sub rsp-tn delta))) + ;; C stack must be 16 byte aligned + (inst and rsp-tn #xfffffff0) (move result rsp-tn))) (define-vop (dealloc-number-stack-space) (:info amount) (:generator 0 (unless (zerop amount) - (let ((delta (logandc2 (+ amount 3) 3))) + (let ((delta (logandc2 (+ amount 7) 7))) (inst add rsp-tn delta))))) (define-vop (alloc-alien-stack-space)