Index: /trunk/source/lisp-kernel/x86-spentry32.s
===================================================================
--- /trunk/source/lisp-kernel/x86-spentry32.s	(revision 13170)
+++ /trunk/source/lisp-kernel/x86-spentry32.s	(revision 13171)
@@ -4324,5 +4324,5 @@
         __(shrl $24,%ecx)
         __(andl $0x007fffff,%eax) /* callback index */
-        __(movl %ecx,-12(%ebp))
+        __(movl %ecx,-20(%ebp))
         /* If the C stack is 16-byte aligned by convention,
            it should still be, and this'll be a NOP. */
@@ -4388,11 +4388,11 @@
 	__(pop %esi)
 	__(pop %edi)
+        __(movl -12(%ebp),%ecx) /* magic value for ObjC bridge */
         __(cmpb $1,-16(%ebp))
-        __(movl -12(%ebp),%ecx) /* magic value for ObjC bridge or winapi */
         __(jae 1f)
 	__(movl -8(%ebp),%eax)
         __(movl -4(%ebp),%edx)
         __ifdef([WIN_32])
-         __(testl %ecx,%ecx)
+	 __(cmpl $0,-20(%ebp))
          __(jne local_label(winapi_return))
 	__endif
@@ -4411,5 +4411,5 @@
         __(flds -8(%ebp))
         __ifdef([WIN_32])
-         __(testl %ecx,%ecx)
+	 __(cmpl $0,-20(%ebp))
          __(jne local_label(winapi_return))
         __endif
@@ -4419,5 +4419,5 @@
         __(fldl -8(%ebp))
         __ifdef([WIN_32])
-         __(testl %ecx,%ecx)
+	 __(cmpl $0,-20(%ebp))
          __(jne local_label(winapi_return))
         __endif
@@ -4426,4 +4426,5 @@
         __ifdef([WIN_32])
 local_label(winapi_return):
+	  __(movl -20(%ebp),%ecx)
 	  __(leave)
          /* %ecx is non-zero and contains count of arg words to pop */
