kc3-lang/libffi/src/powerpc/ffi.c

Branch :


Log

Author Commit Date CI Message
ab79d6e2 2013-11-21 06:12:35 This separates the 32-bit sysv/linux/bsd code from the 64-bit linux code, and makes it possible to link code compiled with different options to those used to compile libffi. For example, a -mlong-double-128 libffi can be used with -mlong-double-64 code. Using the return value area as a place to pass parameters wasn't such a good idea, causing a failure of cls_ulonglong.c. I didn't see this when running the mainline gcc libffi testsuite because that version of the test is inferior to the upstreamm libffi test. Using NUM_FPR_ARG_REGISTERS rather than NUM_FPR_ARG_REGISTERS64 meant that a parameter save area could be allocated before it was strictly necessary. Wrong but harmless. Found when splitting apart ffi.c into 32-bit and 64-bit support.
ac753688 2013-11-21 06:12:35 This separates the 32-bit sysv/linux/bsd code from the 64-bit linux code, and makes it possible to link code compiled with different options to those used to compile libffi. For example, a -mlong-double-128 libffi can be used with -mlong-double-64 code. Using the return value area as a place to pass parameters wasn't such a good idea, causing a failure of cls_ulonglong.c. I didn't see this when running the mainline gcc libffi testsuite because that version of the test is inferior to the upstreamm libffi test. Using NUM_FPR_ARG_REGISTERS rather than NUM_FPR_ARG_REGISTERS64 meant that a parameter save area could be allocated before it was strictly necessary. Wrong but harmless. Found when splitting apart ffi.c into 32-bit and 64-bit support.
83f65b63 2013-11-16 06:53:50 Finally, this adds _CALL_ELF == 2 support. ELFv1 objects can't be linked with ELFv2 objects, so this is one case where preprocessor tests in ffi.c are fine. Also, there is no need to define a new FFI_ELFv2 or somesuch value in enum ffi_abi. FFI_LINUX64 will happily serve both ABIs.
1fd04578 2013-11-16 06:53:50 Finally, this adds _CALL_ELF == 2 support. ELFv1 objects can't be linked with ELFv2 objects, so this is one case where preprocessor tests in ffi.c are fine. Also, there is no need to define a new FFI_ELFv2 or somesuch value in enum ffi_abi. FFI_LINUX64 will happily serve both ABIs.
36285137 2013-11-16 06:52:43 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
1c06515d 2013-11-16 06:41:36 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
164283f4 2013-11-16 06:38:55 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..
128cd1d2 2013-10-08 06:45:51 Fix spelling errors
d3d099b4 2013-07-02 16:11:38 little-endian ppc64 support
4acf0056 2013-03-16 08:18:45 Build fix for soft-float power targets
70b11b47 2013-02-08 16:12:19 Fix small struct passing on ppc
8bd15d13 2013-02-08 13:56:37 Fix many.c testcase for ppc
f6b58d2b 2012-11-22 16:26:21 fix build on ppc when long double == double
65f40c35 2012-04-03 07:35:59 Repair ppc build regression.
52891f8a 2011-11-12 16:35:55 Add powerpc soft float support
af18df2b 2011-11-12 15:52:08 Remove use of ppc string instructions
18dd85d6 2011-02-25 16:23:04 rc8. fix last patch.
74ee6ea8 2011-02-25 15:52:14 rc7. More AIX fixes.
2541679d 2011-02-25 15:09:13 Fix ppc32 bug
1fbf9dc4 2011-02-13 08:06:39 Fix bad_abi test. rc5.
2e7e03d0 2009-12-31 07:43:22 Final updates before 3.0.9
0cfe60e9 2009-12-29 10:06:04 3.0.9rc12
6a341241 2009-12-26 06:51:33 Add Andreas Schwab's powerpc fix
c6dddbd0 2009-10-04 08:11:33 Initial commit