[Openmcl-cvs-notifications] r11421 - /trunk/source/compiler/X86/X8632/x8632-vinsns.lisp

rme at clozure.com rme at clozure.com
Mon Nov 24 15:11:06 EST 2008


Author: rme
Date: Mon Nov 24 15:11:06 2008
New Revision: 11421

Log:
In ALLOC-C-FRAME and ALLOC-VARIABLE-C-FRAME, work around a Darwin bug
by leaving an extra word of space in the parameter area.

(Supersedes r11414, which reserved even more extra space.)

Modified:
    trunk/source/compiler/X86/X8632/x8632-vinsns.lisp

Modified: trunk/source/compiler/X86/X8632/x8632-vinsns.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/compiler/X86/X8632/x8632-vinsns.lisp (original)
+++ trunk/source/compiler/X86/X8632/x8632-vinsns.lisp Mon Nov 24 15:11:06 2=
008
@@ -3685,8 +3685,9 @@
                                    ((nwords :u32const))
 				   ((temp :imm)))
   (movd (:@ (:%seg :rcontext) x8632::tcr.foreign-sp) (:%mmx x8632::stack-t=
emp))
-  ;; make frame at least 24 bytes long
-  (subl (:$l (:apply ash (:apply max 6 nwords) x8632::word-shift))
+  ;; Work around Apple bug number 6386516 (open stub may clobber stack)
+  ;; by leaving an extra word of space in the parameter area.
+  (subl (:$l (:apply ash (:apply 1+ nwords) x8632::word-shift))
 	(:@ (:%seg :rcontext) x8632::tcr.foreign-sp))
   ;; align stack to 16-byte boundary
   (andb (:$b -16) (:@ (:%seg :rcontext) x8632::tcr.foreign-sp))
@@ -3699,10 +3700,10 @@
                                             ((nwords :imm))
                                             ((temp :imm)))
   (movd (:@ (:%seg :rcontext) x8632::tcr.foreign-sp) (:%mmx x8632::stack-t=
emp))
-  ;; make frame at least 24 bytes long (note that nwords is a fixnum)
-  (movl (:$l 24) (:%l temp))
-  (rcmpl (:%l nwords) (:%l temp))
-  (cmoval (:%l nwords) (:%l temp))
+  ;; Work around Apple bug number 6386516 (open stub may clobber stack)
+  ;; by leaving an extra word of space in the parameter area.
+  ;; Note that nwords is a fixnum.
+  (leal (:@ 4 (:%l nwords)) (:%l temp))
   (subl (:%l temp) (:@ (:%seg :rcontext) x8632::tcr.foreign-sp))
   ;; align stack to 16-byte boundary
   (andb (:$b -16) (:@ (:%seg :rcontext) x8632::tcr.foreign-sp))



More information about the Openmcl-cvs-notifications mailing list