Update of /cvsroot/squeak/squeak/platforms/win32/plugins/SqueakFFIPrims
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5323/plugins/SqueakFFIPrims
Modified Files:
Tag: ned-branch
sqWin32FFI.c
Log Message:
Initial GCC 3.3 changes
Index: sqWin32FFI.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/plugins/SqueakFFIPrims/sqWin32FFI.c,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** sqWin32FFI.c 1 Jun 2002 11:44:39 -0000 1.2
--- sqWin32FFI.c 16 Jul 2004 18:21:35 -0000 1.2.2.1
***************
*** 322,364 ****
#endif
#ifdef __GNUC__
! asm("
! movl %%ebp, _oldBP
! movl %%esp, _oldSP
! pushl %%ebx;
! pushl %%ecx;
! pushl %%edx;
! pushl %%edi;
! pushl %%esi;
! pushl %%ebp;
! /* mark the frame */
! movl %%esp, %%ebp
! /* alloca() ffiStackIndex size bytes */
! movl _ffiArgIndex, %%ecx;
! shll $2, %%ecx;
! subl %%ecx, %%esp
! /* copy stack */
! movl %%esp, %%edi;
! leal _ffiArgs, %%esi;
! shrl $2, %%ecx;
! cld;
! rep movsl;
! /* go calling */
! call *%%ebx
! /* restore frame */
! movl %%ebp, %%esp
! /* store the return values */
! movl %%eax, _intReturnValue
! movl %%edx, _intReturnValue2
! fstpl _floatReturnValue
! /* restore register values */
! popl %%ebp
! popl %%esi
! popl %%edi
! popl %%edx
! popl %%ecx
! popl %%ebx
! movl %%ebp, _newBP
! movl %%esp, _newSP
! ": /* no outputs */ : "ebx" (fn) : "eax" /* clobbered registers */);
/* done */
#endif
--- 322,362 ----
#endif
#ifdef __GNUC__
! asm(" movl %%ebp, _oldBP\n"
! " movl %%esp, _oldSP\n"
! " pushl %%ebx;\n"
! " pushl %%ecx;\n"
! " pushl %%edx;\n"
! " pushl %%edi;\n"
! " pushl %%esi;\n"
! " pushl %%ebp;\n"
! " /* mark the frame */\n"
! " movl %%esp, %%ebp\n"
! " /* alloca() ffiStackIndex size bytes */\n"
! " movl _ffiArgIndex, %%ecx;\n"
! " shll $2, %%ecx;\n"
! " subl %%ecx, %%esp\n"
! " /* copy stack */\n"
! " movl %%esp, %%edi;\n"
! " leal _ffiArgs, %%esi;\n"
! " shrl $2, %%ecx;\n"
! " cld;\n"
! " rep movsl;\n"
! " /* go calling */\n"
! " call *%%ebx\n"
! " /* restore frame */\n"
! " movl %%ebp, %%esp\n"
! " /* store the return values */\n"
! " movl %%eax, _intReturnValue\n"
! " movl %%edx, _intReturnValue2\n"
! " fstpl _floatReturnValue\n"
! " /* restore register values */\n"
! " popl %%ebp\n"
! " popl %%esi\n"
! " popl %%edi\n"
! " popl %%edx\n"
! " popl %%ecx\n"
! " popl %%ebx\n"
! "movl %%ebp, _newBP\n"
! "movl %%esp, _newSP\n" : /* no outputs */ : "ebx" (fn) : "eax" /* clobbered registers */ );
/* done */
#endif
|