From: Nikodemus Siivola Date: Wed, 11 Apr 2007 13:59:24 +0000 (+0000) Subject: 1.0.4.61: stack-alignment on CALL-OUT VOP on x86/Darwin X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;ds=inline;h=b28aadc5bd34a0d9fa0ff15c52b2b4164d955831;p=sbcl.git 1.0.4.61: stack-alignment on CALL-OUT VOP on x86/Darwin * As in call_into_c, comment on the OAOOMness. * Fixes init.test.sh & core.test.sh failures on threaded Darwin builds. --- diff --git a/NEWS b/NEWS index c81c7ff..6f4a064 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,8 @@ changes in sbcl-1.0.5 relative to sbcl-1.0.4: to global variables using SYMBOL-VALUE and a constant argument. * enhancement: SIGINT now causes a specific condition SB-SYS:INTERACTIVE-INTERRUPT to be signalled. + * bug fix: inlined calls to C now ensure 16byte stack alignment on + x86/Darwin. * bug fix: bad type declaration in the CLOS implementation has been fixed. (reported by James Anderson) * bug fix: incorrect ROOM reporting on x86-64 has been fixed. 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? diff --git a/src/runtime/x86-assem.S b/src/runtime/x86-assem.S index c4d2f5e..e1eba22 100644 --- a/src/runtime/x86-assem.S +++ b/src/runtime/x86-assem.S @@ -100,6 +100,9 @@ * floats. * * This should work for Lisp calls C calls Lisp calls C.. + * + * FIXME & OAOOM: This duplicates call-out in src/compiler/x86/c-call.lisp, + * so if you tweak this, change that too! */ .text .align align_16byte,0x90 diff --git a/version.lisp-expr b/version.lisp-expr index d53d6bf..6bca730 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.4.60" +"1.0.4.61"