|
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.
|