5961d13d27
* src/pa/ffi.c (ffi_struct_type): Put type declaration on separate line. (ffi_prep_args_pa32): Likewise. (ffi_size_stack_pa32): Likewise. (ffi_prep_cif_machdep): Likewise. (ffi_call): Likewise. Rename to ffi_call_int. Add closure argument and update call to ffi_call_pa32. (ffi_call, ffi_call_go, ffi_prep_go_closure): New. (ffi_closure_inner_pa32): Update to handle go closures. * src/pa/ffitarget.h (FFI_GO_CLOSURES): Define. * src/pa/hpux32.S (ffi_call_pa32): Pass go closure argument in static chain register (%ret1). (ffi_closure_pa32): Set closure type argument to zero. (ffi_go_closure_pa32): New function. Add unwind data for it. * src/pa/linux.S: Likewise. Use cfi directives for unwind data. * testsuite/libffi.go/static-chain.h (STATIC_CHAIN_REG): Define for hppa. From-SVN: r239978
26 lines
651 B
C
26 lines
651 B
C
#ifdef __aarch64__
|
|
# define STATIC_CHAIN_REG "x18"
|
|
#elif defined(__alpha__)
|
|
# define STATIC_CHAIN_REG "$1"
|
|
#elif defined(__arm__)
|
|
# define STATIC_CHAIN_REG "ip"
|
|
#elif defined(__hppa__)
|
|
# if defined(__LP64)
|
|
# define define STATIC_CHAIN_REG "%r31"
|
|
# else
|
|
# define define STATIC_CHAIN_REG "%r29" /* %ret1 */
|
|
# endif
|
|
#elif defined(__sparc__)
|
|
# if defined(__arch64__) || defined(__sparcv9)
|
|
# define STATIC_CHAIN_REG "g5"
|
|
# else
|
|
# define STATIC_CHAIN_REG "g2"
|
|
# endif
|
|
#elif defined(__x86_64__)
|
|
# define STATIC_CHAIN_REG "r10"
|
|
#elif defined(__i386__)
|
|
# ifndef ABI_NUM
|
|
# define STATIC_CHAIN_REG "ecx" /* FFI_DEFAULT_ABI only */
|
|
# endif
|
|
#endif
|