src/powerpc/ffitarget.h


Log

Author Commit Date CI Message
Alan Modra ab79d6e2 2013-11-21T06: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.
Alan Modra ac753688 2013-11-21T06: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.
Alan Modra 83f65b63 2013-11-16T06: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.
Alan Modra 1fd04578 2013-11-16T06: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.
Alan Modra 164283f4 2013-11-16T06: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..
Anthony Green 8360bf1c 2012-02-23T07:01:13 Ensure that users don't include ffitarget.h directly
Anthony Green 52891f8a 2011-11-12T16:35:55 Add powerpc soft float support
Anthony Green 0e584399 2011-02-08T07:52:40 Refresh from GCC
Anthony Green 5feacad4 2010-08-05T08:30:04 define generic symbols carefully
Anthony Green 115ab36f 2009-12-24T00:22:00 Update missing changes for 3.0.9r4.
Anthony Green c6dddbd0 2009-10-04T08:11:33 Initial commit