X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Fc-call.lisp;h=df61c5cc7c60c34d680defbc843c36167f31b7bc;hb=b28aadc5bd34a0d9fa0ff15c52b2b4164d955831;hp=e44100311e6193b81a8edb2187770519d4767d8d;hpb=8bb7e14a921675eacec2dad00ed3060289cf6538;p=sbcl.git diff --git a/src/compiler/x86/c-call.lisp b/src/compiler/x86/c-call.lisp index e441003..df61c5c 100644 --- a/src/compiler/x86/c-call.lisp +++ b/src/compiler/x86/c-call.lisp @@ -219,6 +219,9 @@ (:save-p t) (:ignore args ecx edx) (:generator 0 + ;; FIXME & OAOOM: This is brittle and error-prone to maintain two + ;; instances of the same logic, on in arch-assem.S, and one in + ;; c-call.lisp. If you modify this, modify that one too... (cond ((policy node (> space speed)) (move eax function) (inst call (make-fixup "call_into_c" :foreign))) @@ -228,7 +231,12 @@ (dotimes (i 8) (inst fstp fr0-tn)) - #!+win32 (inst cld) + #!+win32 + (inst cld) + + #!+darwin + ;; Align stack for C. + (inst and esp-tn #xfffffff0) (inst call function) ;; To give the debugger a clue. XX not really internal-error?