Andrew Haley wrote:
x86 changes: merge from libffi -> gcc.
Timothy Wall, please check this one.
I am not he, but ...
--- /home/aph/gcc/trunk/libffi/src/x86/win32.S 2009-06-04
15:43:59.000000000 +0100
+++ ./src/x86/win32.S 2009-06-04 15:30:26.000000000 +0100
@@ -264,6 +264,22 @@
.ffi_call_STDCALL_end:
.LFE2:
+ .globl _ffi_closure_STDCALL
+_ffi_closure_STDCALL:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $40, %esp
+ leal -24(%ebp), %edx
+ movl %edx, -12(%ebp) /* resp */
+ leal 12(%ebp), %edx /* account for stub return address on stack
*/
+ movl %edx, 4(%esp) /* args */
+ leal -12(%ebp), %edx
+ movl %edx, (%esp) /* &resp */
+ call _ffi_closure_SYSV_inner
+ movl -12(%ebp), %ecx
+ jmp .Lcls_return_result
^^^^^^^^^^^^^^^^^^^^^^^^^
I figured we couldn't share this code, owing to the need to have
discontiguous FDEs in the debug info. Looks like you effectively
have the
inverse of my last patch in there along with some of the libffi
changes.
- /* It would be nice to just share this code with the
- duplicate sequence in _ffi_closure_SYSV, if only
- there were some way to represent that in the EH info. */
Refs: http://gcc.gnu.org/ml/gcc-patches/2009-05/msg01473.html
http://gcc.gnu.org/ml/gcc-patches/2009-05/msg01476.html