src/powerpc


Log

Author Commit Date CI Message
Tony Reix 0ff9419f 2017-05-17T14:57:53 This patch enables FFI Go Closure on AIX.
Gregory Pakosz bd72848c 2017-04-27T13:20:36 Prefix ALIGN macros with FFI_
Iain Sandoe 52fbd12d 2016-05-26T09:00:00 [Darwin-ppc, build] Fixes for clang build. clang is experimental on powerpc-darwin, but the changes are appropriate to cctools as as well. Use the 'official' simplified cmpwi insn, rather than the implied one accepted by cctools. Do not re-use a set value.
Alan Modra 43fc5bca 2015-08-03T23:34:05 Correct powerpc sysv stack argument accounting ppc32 starts using the stack for integer arg passing when we run out of integer arg passing registers. Similarly, we start using the stack for floating point args when we run out of floating point registers. The decision on where an integer arg goes does not depend on number of floating point args, nor does the decision on where a floating point arg goes depend on number of integer args. Alignment of stack args also simply depends on number of stack args. This patch untangles the horrible mess we had, with intarg_count being wrongly used to count both integer args and stack words. * src/powerpc/ffi_sysv.c (ffi_prep_cif_sysv_core): Count fprs, gprs, and stack words separately. (ffi_prep_args_SYSV): Similarly.
Richard Henderson 590663b3 2014-11-18T12:56:58 powerpc: Fix ffi_go_closure_linux64 Unlike ffi_closure_LINUX64, this entry point is called normally, so we already have the TOC in R2 and the closure in R11. * powerpc/linux64_closure.S (ffi_closure_LINUX64): Remove a register dependency chain. (ffi_go_closure_linux64): Don't load r11 or r2.
Alan Modra fa1040c1 2014-11-10T09:42:31 GO closures for powerpc linux Plus .cfi async unwind info, rearrangement of ffi_call_linux64 and ffi_call_SYSV function params to avoid register copies, tweaks to trampolines. * src/powerpc/ffitarget.h (FFI_GO_CLOSURES): Define. * src/powerpc/ffi.c (ffi_call_int): New function with extra closure param, and args rearranged on ffi_call_linux64 and ffi_call_SYSV calls, extracted from .. (ffi_call): ..here. (ffi_call_go, ffi_prep_go_closure): New functions. * src/powerpc/ffi_linux64.c (ffi_prep_closure_loc_linux64): Make hidden. Only flush insn part of ELFv2 trampoline. Don't shuffle ELFv1 trampoline. (ffi_closure_helper_LINUX64): Replace closure param with cif, fun, user_data params. * src/powerpc/ffi_powerpc.h (ffi_go_closure_sysv): Declare. (ffi_go_closure_linux64): Declare. (ffi_call_SYSV, fi_call_LINUX64): Update. (ffi_prep_closure_loc_sysv, ffi_prep_closure_loc_linux64): Declare. (ffi_closure_helper_SYSV, ffi_closure_helper_LINUX64): Update. * src/powerpc/ffi_sysv.c (ASM_NEEDS_REGISTERS): Increase to 6. (ffi_prep_closure_loc_sysv): Use bcl in trampoline, put data words last, flush just the insn part. (ffi_closure_helper_SYSV): Replace closure param with cif, fun and user_data params. * src/powerpc/linux64.S (ffi_call_LINUX64): Replace hand-written .eh_frame with .cfi directives. Adjust for changed param order. Pass extra "closure" param to user function in static chain. Add .cfi directives to describe epilogue. Don't provide traceback table for ELFv2 or _CALL_LINUX. * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Replace hand-written .eh_frame with .cfi directives. Adjust for changed ffi_closure_helper_LINUX64 params. Add .cfi directives to describe epilogue. Don't provide traceback table for ELFv2 or _CALL_LINUX. (ffi_go_closure_linux64): New function. * src/powerpc/sysv.S: Remove redundant .globl ffi_prep_args_SYSV. (ffi_call_SYSV): Make hidden. Replace hand-written .eh_frame with .cfi directives. Adjust for changed params. Pass extra "closure" param to user function in static chain. Add .cfi directives to describe epilogue. * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Make hidden. Replace hand-written .eh_frame with .cfi directives. Adjust for changed ffi_closure_helper_SYSV params. Add .cfi directives to describe epilogue. Don't just use nops in the dead __NO_FPRS__ epilogues. (ffi_go_closure_sysv): New function.
Alan Modra d3d06f4c 2014-11-10T13:50:05 Fix powerpc breakage from 6e8a4460 * src/powerpc/ffitarget.h: #error on unexpected FFI_TYPE_LAST. (FFI_PPC_TYPE_LAST): Define. (FFI_TYPE_UINT128): Define in terms of FFI_PPC_TYPE_LAST. (FFI_SYSV_TYPE_SMALL_STRUCT, FFI_V2_TYPE_FLOAT_HOMOG): Likewise. (FFI_V2_TYPE_DOUBLE_HOMOG, FFI_V2_TYPE_SMALL_STRUCT): Likewise.
Richard Henderson f8632815 2014-11-13T12:32:35 powerpc: Delete patch output Clearly added by mistake.
Jakub Jelinek 32cb2ce8 2014-09-20T06:39:55 2014-09-10 Jakub Jelinek <jakub@redhat.com> * src/powerpc/linux64.S: Emit .note.GNU-stack even when POWERPC64 is not defined. * src/powerpc/linux64_closure.S: Likewise. Also test _CALL_ELF == 2.
Marcus Comstedt fa5f25c2 2014-01-04T19:00:08 Linux/ppc64: Remove assumption on contents of r11 in closure
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.
Iain Sandoe aa1f62c0 2013-11-18T13:11:56 Fix PowerPC Darwin FDE encodings to use pcrel correctly. Modernise the picbase labels.
Alan Modra 16d56c51 2013-11-18T06:36:03 An #endif in the wrong place would cause compile failure on powerpcle. Using bl instead of b doesn't cause runtime failures as you might think, but does mess the processor branch prediction.
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 36285137 2013-11-16T06: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
Alan Modra 1c06515d 2013-11-16T06: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
Alan Modra a97cf1fa 2013-11-16T06:40:13 This patch prepares for ELFv2, where sizes of these areas change. It also makes some minor changes to improve code efficiency.
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 128cd1d2 2013-10-08T06:45:51 Fix spelling errors
Anthony Green d3d099b4 2013-07-02T16:11:38 little-endian ppc64 support
Anthony Green 4acf0056 2013-03-16T08:18:45 Build fix for soft-float power targets
Anthony Green 70b11b47 2013-02-08T16:12:19 Fix small struct passing on ppc
Anthony Green 8bd15d13 2013-02-08T13:56:37 Fix many.c testcase for ppc
Anthony Green 05fbe1fa 2013-01-11T16:54:40 xlc compiler support
rofl0r f6b58d2b 2012-11-22T16:26:21 fix build on ppc when long double == double
Anthony Green dfadfb19 2012-10-31T06:46:41 Rebase for ppc64 fix
Anthony Green 853cc722 2012-04-10T06:33:33 Fix typo for darwin targets
Anthony Green 65f40c35 2012-04-03T07:35:59 Repair ppc build regression.
Anthony Green bd78c9c3 2012-03-21T08:09:30 More cygwin fixes
Anthony Green 84d3253f 2012-03-19T23:07:35 Rebase post GCC merge
Anthony Green 8360bf1c 2012-02-23T07:01:13 Ensure that users don't include ffitarget.h directly
Anthony Green ea14ae85 2011-11-12T16:36:59 clean up
Anthony Green 52891f8a 2011-11-12T16:35:55 Add powerpc soft float support
Anthony Green af18df2b 2011-11-12T15:52:08 Remove use of ppc string instructions
Anthony Green 3d56106b 2011-11-12T07:20:24 Rebase
Anthony Green 2d3fb364 2011-03-30T16:54:42 Fix darwin EH
Anthony Green 18dd85d6 2011-02-25T16:23:04 rc8. fix last patch.
Anthony Green 74ee6ea8 2011-02-25T15:52:14 rc7. More AIX fixes.
Anthony Green 2541679d 2011-02-25T15:09:13 Fix ppc32 bug
Anthony Green 1fbf9dc4 2011-02-13T08:06:39 Fix bad_abi test. rc5.
Anthony Green 6972a4ff 2011-02-11T07:32:51 Fix xlc build on AIX
Anthony Green 19ce7131 2011-02-08T10:34:23 grammar fix
Anthony Green 0e584399 2011-02-08T07:52:40 Refresh from GCC
Anthony Green 2db72615 2010-11-21T10:50:56 Rebase
Anthony Green 5feacad4 2010-08-05T08:30:04 define generic symbols carefully
Anthony Green 3f5b1375 2010-07-12T14:39:18 rebase
Anthony Green 9dc9a293 2010-04-13T10:33:52 Rebase to latest GCC sources
Anthony Green f2c2a4fc 2010-04-13T10:19:28 Remove warnings and add OS/2 support
Anthony Green 7b7a42f2 2010-01-12T09:14:14 Rebase from GCC
Anthony Green c3042afa 2010-01-01T08:08:02 Reset quilt patches post 3.0.9 merge with GCC
Anthony Green 2e7e03d0 2009-12-31T07:43:22 Final updates before 3.0.9
Anthony Green aea706c5 2009-12-29T10:09:31 really 3.0.9rc12
Anthony Green 0cfe60e9 2009-12-29T10:06:04 3.0.9rc12
Anthony Green 9458d88f 2009-12-26T07:02:27 Rebase from GCC
Anthony Green 6a341241 2009-12-26T06:51:33 Add Andreas Schwab's powerpc fix
Anthony Green da11bece 2009-12-24T05:34:46 Release 3.0.9rc5
Anthony Green 115ab36f 2009-12-24T00:22:00 Update missing changes for 3.0.9r4.
Anthony Green cd98813d 2009-10-05T00:25:29 From Jens Rehsack. Fix for 64-bit AIX.
Anthony Green c6dddbd0 2009-10-04T08:11:33 Initial commit