1.0.4.61: stack-alignment on CALL-OUT VOP on x86/Darwin
authorNikodemus Siivola <nikodemus@random-state.net>
Wed, 11 Apr 2007 13:59:24 +0000 (13:59 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Wed, 11 Apr 2007 13:59:24 +0000 (13:59 +0000)
 * As in call_into_c, comment on the OAOOMness.

 * Fixes init.test.sh & core.test.sh failures on threaded
   Darwin builds.

NEWS
src/compiler/x86/c-call.lisp
src/runtime/x86-assem.S
version.lisp-expr

diff --git a/NEWS b/NEWS
index c81c7ff..6f4a064 100644 (file)
--- 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.
index e441003..df61c5c 100644 (file)
   (: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)))
            (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?
index c4d2f5e..e1eba22 100644 (file)
  * 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
index d53d6bf..6bca730 100644 (file)
@@ -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"