[PowerPC] libffi fixes and support for PowerPC64 ELFv2

Alan Modra amodra@gmail.com
Mon Nov 18 02:09:00 GMT 2013


On Sun, Nov 17, 2013 at 07:53:59AM -0500, David Edelsohn wrote:
> On Sun, Nov 17, 2013 at 1:25 AM, Alan Modra <amodra@gmail.com> wrote:
> > On Sat, Nov 16, 2013 at 10:18:05PM +1030, Alan Modra wrote:
> >> The following six patches correspond to patches posted to the libffi
> >> mailing list a few days ago to add support for PowerPC64 ELFv2.  The
> >
> > The ChangeLog just became easier to write.  :)
> >
> >         * src/powerpc/ffitarget.h: Import from upstream.
> >         * src/powerpc/ffi.c: Likewise.
> >         * src/powerpc/linux64.S: Likewise.
> >         * src/powerpc/linux64_closure.S: Likewise.
> >         * doc/libffi.texi: Likewise.
> >         * testsuite/libffi.call/cls_double_va.c: Likewise.
> >         * testsuite/libffi.call/cls_longdouble_va.c: Likewise.
> >
> > OK to apply?
> 
> Okay.
> 
> Thanks, David

Committed revision 204917.  I'm also going to apply the following as
obvious.  The error I'm fixing here doesn't cause a runtime failure,
but does mess with the processor return branch prediction.

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 204917)
+++ ChangeLog	(working copy)
@@ -1,5 +1,7 @@
 2013-11-18  Alan Modra  <amodra@gmail.com>
 
+	* src/powerpc/ppc_closure.S: Don't bl .Luint128.
+
 	* src/powerpc/ffitarget.h: Import from upstream.
 	* src/powerpc/ffi.c: Likewise.
 	* src/powerpc/linux64.S: Likewise.
Index: src/powerpc/ppc_closure.S
===================================================================
--- src/powerpc/ppc_closure.S	(revision 204916)
+++ src/powerpc/ppc_closure.S	(working copy)
@@ -238,7 +238,7 @@
 	lwz %r3,112+0(%r1)
 	lwz %r4,112+4(%r1)
 	lwz %r5,112+8(%r1)
-	bl .Luint128
+	b .Luint128
 
 # The return types below are only used when the ABI type is FFI_SYSV.
 # case FFI_SYSV_TYPE_SMALL_STRUCT + 1. One byte struct.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Gcc-patches mailing list