Commit Graph

20 Commits

Author SHA1 Message Date
Alan Modra
362851379a Andreas' 2013-02-08 change reverted some breakage for struct return
values from 2011-11-12, but in so doing reintroduced string
instructions to sysv.S that are not supported on all powerpc variants.
This patch properly copies the bounce buffer to destination in C code
rather than in asm.

I have tested this on powerpc64-linux, powerpc-linux and
powerpc-freebsd.  Well, the last on powerpc-linux by lying to
configure with

CC="gcc -m32 -msvr4-struct-return -mlong-double-64" \
CXX="g++ -m32 -msvr4-struct-return -mlong-double-64" \
/src/libffi-current/configure --build=powerpc-freebsd

and then

make && make CC="gcc -m32" CXX="g++ -m32" \
RUNTESTFLAGS=--target_board=unix/-m32/-msvr4-struct-return/-mlong-double-64\
 check
2013-11-16 06:52:43 -05:00
Alan Modra
1c06515d92 The powerpc64 ABIs align structs passed by value, a fact ignored by
gcc for quite some time.  Since gcc now does the correct alignment,
libffi needs to follow suit.  This ought to be made selectable via
a new abi value, and the #ifdefs removed from ffi.c along with many
other #ifdefs present there and in assembly.  I'll do that with a
followup patch sometime.

This is a revised version of
https://sourceware.org/ml/libffi-discuss/2013/msg00162.html
2013-11-16 06:41:36 -05:00
Alan Modra
164283f4ac The powerpc64 support opted to pass floating point values both in the
fpr area and the parameter save area, necessary when the backend
doesn't know if a function argument corresponds to the ellipsis
arguments of a variadic function.  This patch adds powerpc support for
variadic functions, and changes the code to only pass fp in the ABI
mandated area.  ELFv2 needs this change since the parameter save area
may not exist there.

This also fixes two faulty tests that used a non-variadic function
cast to call a variadic function, and spuriously reasoned that this is
somehow necessary for static functions..
2013-11-16 06:38:55 -05:00
Anthony Green
128cd1d2f3 Fix spelling errors 2013-10-08 06:45:51 -04:00
Anthony Green
d3d099b40c little-endian ppc64 support 2013-07-02 16:11:38 -04:00
Anthony Green
4acf0056f5 Build fix for soft-float power targets 2013-03-16 08:18:45 -04:00
Anthony Green
70b11b47ee Fix small struct passing on ppc 2013-02-08 16:12:19 -05:00
Anthony Green
8bd15d139a Fix many.c testcase for ppc 2013-02-08 13:56:37 -05:00
rofl0r
f6b58d2bdc fix build on ppc when long double == double 2012-11-22 16:26:21 +01:00
Anthony Green
65f40c35a2 Repair ppc build regression. 2012-04-03 07:35:59 -04:00
Anthony Green
52891f8a93 Add powerpc soft float support 2011-11-12 16:35:55 -05:00
Anthony Green
af18df2bc2 Remove use of ppc string instructions 2011-11-12 15:52:08 -05:00
Anthony Green
18dd85d6cb rc8. fix last patch. 2011-02-25 16:23:04 -05:00
Anthony Green
74ee6ea8b4 rc7. More AIX fixes. 2011-02-25 15:52:14 -05:00
Anthony Green
2541679dbd Fix ppc32 bug 2011-02-25 15:09:13 -05:00
Anthony Green
1fbf9dc44f Fix bad_abi test. rc5. 2011-02-13 08:06:39 -05:00
Anthony Green
2e7e03d014 Final updates before 3.0.9 2009-12-31 07:43:22 -05:00
Anthony Green
0cfe60e9d1 3.0.9rc12 2009-12-29 10:06:04 -05:00
Anthony Green
6a34124175 Add Andreas Schwab's powerpc fix 2009-12-26 06:51:33 -05:00
Anthony Green
c6dddbd02b Initial commit 2009-10-04 08:11:33 -04:00