This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch 0/3] libffi/m68k patches (take 2)
- From: Roman Zippel <zippel at linux-m68k dot org>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 10 May 2007 15:01:17 +0200 (CEST)
- Subject: Re: [patch 0/3] libffi/m68k patches (take 2)
- References: <20070227175108.947774000@linux-m68k.org> <m3wt1vi9f5.fsf@localhost.localdomain>
Hi,
On Mon, 5 Mar 2007, Tom Tromey wrote:
> >>>>> "Roman" == Roman Zippel <zippel@linux-m68k.org> writes:
>
> Roman> A slightly updated version of libffi patches I submitted earlier, the
> Roman> only big change is that .cfi opcodes are now conditional, otherwise I
> Roman> made the closure support a separate patch.
> Roman> Now also hopefully with corrects changelogs. :)
>
> Given that the earlier one was approved modulo a ChangeLog fix, I
> think this one is ok. The ChangeLog looked reasonable to me and the
> new configure code is fine.
I completely missed your message and I already wanted to send a ping. :)
Sorry for the long delay, I'll commit the patches shortly, for the
reference below is the change to one of the patches due to other changes
that went in the meantime. I've retested everything without problems.
bye, Roman
diff -pur libffi/src/m68k/ffi.c libffi.new/src/m68k/ffi.c
--- libffi/src/m68k/ffi.c 2007-05-09 13:43:44.000000000 +0200
+++ libffi.new/src/m68k/ffi.c 2007-05-09 13:43:15.000000000 +0200
@@ -250,15 +249,16 @@ ffi_closure_SYSV_inner (ffi_closure *clo
}
ffi_status
-ffi_prep_closure (ffi_closure* closure,
- ffi_cif* cif,
- void (*fun)(ffi_cif*,void*,void**,void*),
- void *user_data)
+ffi_prep_closure_loc (ffi_closure* closure,
+ ffi_cif* cif,
+ void (*fun)(ffi_cif*,void*,void**,void*),
+ void *user_data,
+ void *codeloc)
{
FFI_ASSERT (cif->abi == FFI_SYSV);
*(unsigned short *)closure->tramp = 0x207c;
- *(void **)(closure->tramp + 2) = closure;
+ *(void **)(closure->tramp + 2) = codeloc;
*(unsigned short *)(closure->tramp + 6) = 0x4ef9;
if (cif->rtype->type == FFI_TYPE_STRUCT
&& !cif->flags)
@@ -266,7 +266,7 @@ ffi_prep_closure (ffi_closure* closure,
else
*(void **)(closure->tramp + 8) = ffi_closure_SYSV;
- syscall(SYS_cacheflush, closure->tramp, FLUSH_SCOPE_LINE,
+ syscall(SYS_cacheflush, codeloc, FLUSH_SCOPE_LINE,
FLUSH_CACHE_BOTH, FFI_TRAMPOLINE_SIZE);
closure->cif = cif;