This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libffi merge

On Jun 4, 2009, at 1:03 PM, Andrew Haley wrote:

Dave Korn wrote:
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 @@

+ .globl _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.  */


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]