This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: libffi merge
Timothy Wall wrote:
> On Jun 4, 2009, at 1:03 PM, Andrew Haley wrote:
>> OK, I backed out that patch. I'm awaiting some explanation of what
>> on Earth is going on. I'm guessing that Timothy Wall changed the
>> version upstream but not the version in gcc, and then you changed
>> the version in gcc but not the version upstream. So, we have a two
>> sets of changes, and I can't tell which is supposed to go where.
>
> I applied the STDCALL closure patch to libffi, but not to GCC. I
> believe Dave applied the STDCALL closure patch to libffi, expanded
> somewhat to include the extra EH info.
OK, so the version in libffi ought to be correct, then.
But I'm looking at src/x86/win32.S in libffi, and I see:
.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
.ffi_closure_STDCALL_end:
which is the code that Dave is complaining about.
Andrew.