Ruby
2.4.2p198(2017-09-14revision59899)
|
Go to the source code of this file.
Data Structures | |
union | _d |
struct | call_context |
struct | arg_state |
Macros | |
#define | AARCH64_STACK_ALIGN 16 |
#define | N_X_ARG_REG 8 |
#define | N_V_ARG_REG 8 |
#define | AARCH64_FFI_WITH_V (1 << AARCH64_FFI_WITH_V_BIT) |
#define | FFI_INIT_TRAMPOLINE(TRAMP, FUN, CTX, FLAGS) |
Functions | |
static void | ffi_clear_cache (void *start, void *end) |
static void * | get_x_addr (struct call_context *context, unsigned n) |
static void * | get_s_addr (struct call_context *context, unsigned n) |
static void * | get_d_addr (struct call_context *context, unsigned n) |
static void * | get_v_addr (struct call_context *context, unsigned n) |
static void * | get_basic_type_addr (unsigned short type, struct call_context *context, unsigned n) |
static size_t | get_basic_type_alignment (unsigned short type) |
static size_t | get_basic_type_size (unsigned short type) |
void | ffi_call_SYSV (unsigned(*)(struct call_context *context, unsigned char *, extended_cif *), struct call_context *context, extended_cif *, size_t, void(*fn)(void)) |
void | ffi_closure_SYSV (ffi_closure *) |
static unsigned | is_floating_type (unsigned short type) |
static unsigned short | get_homogeneous_type (ffi_type *ty) |
static unsigned | element_count (ffi_type *ty) |
static int | is_hfa (ffi_type *ty) |
static int | is_register_candidate (ffi_type *ty) |
static int | is_v_register_candidate (ffi_type *ty) |
static void | arg_init (struct arg_state *state, size_t call_frame_size) |
static unsigned | available_x (struct arg_state *state) |
static unsigned | available_v (struct arg_state *state) |
static void * | allocate_to_x (struct call_context *context, struct arg_state *state) |
static void * | allocate_to_s (struct call_context *context, struct arg_state *state) |
static void * | allocate_to_d (struct call_context *context, struct arg_state *state) |
static void * | allocate_to_v (struct call_context *context, struct arg_state *state) |
static void * | allocate_to_stack (struct arg_state *state, void *stack, size_t alignment, size_t size) |
static void | copy_basic_type (void *dest, void *source, unsigned short type) |
static void | copy_hfa_to_reg_or_stack (void *memory, ffi_type *ty, struct call_context *context, unsigned char *stack, struct arg_state *state) |
static void * | allocate_to_register_or_stack (struct call_context *context, unsigned char *stack, struct arg_state *state, unsigned short type) |
static void | copy_to_register_or_stack (struct call_context *context, unsigned char *stack, struct arg_state *state, void *value, unsigned short type) |
static unsigned | aarch64_prep_args (struct call_context *context, unsigned char *stack, extended_cif *ecif) |
ffi_status | ffi_prep_cif_machdep (ffi_cif *cif) |
void | ffi_call (ffi_cif *cif, void(*fn)(void), void *rvalue, void **avalue) |
ffi_status | ffi_prep_closure_loc (ffi_closure *closure, ffi_cif *cif, void(*fun)(ffi_cif *, void *, void **, void *), void *user_data, void *codeloc) |
void FFI_HIDDEN | ffi_closure_SYSV_inner (ffi_closure *closure, struct call_context *context, void *stack) |
Variables | |
static unsigned char | trampoline [] |
#define AARCH64_FFI_WITH_V (1 << AARCH64_FFI_WITH_V_BIT) |
Definition at line 39 of file ffi.c.
Referenced by ffi_prep_cif_machdep().
#define AARCH64_STACK_ALIGN 16 |
Definition at line 33 of file ffi.c.
Referenced by ffi_prep_cif_machdep().
#define FFI_INIT_TRAMPOLINE | ( | TRAMP, | |
FUN, | |||
CTX, | |||
FLAGS | |||
) |
Definition at line 915 of file ffi.c.
Referenced by ffi_prep_closure_loc().
#define N_V_ARG_REG 8 |
Definition at line 37 of file ffi.c.
Referenced by aarch64_prep_args(), allocate_to_d(), allocate_to_register_or_stack(), allocate_to_s(), allocate_to_v(), available_v(), copy_hfa_to_reg_or_stack(), and ffi_closure_SYSV_inner().
#define N_X_ARG_REG 8 |
Definition at line 36 of file ffi.c.
Referenced by aarch64_prep_args(), allocate_to_register_or_stack(), allocate_to_x(), available_x(), ffi_call(), ffi_closure_SYSV_inner(), and is_register_candidate().
|
static |
Definition at line 658 of file ffi.c.
References ALIGN, allocate_to_stack(), allocate_to_x(), arg_init(), available_x(), extended_cif::avalue, extended_cif::cif, copy_hfa_to_reg_or_stack(), copy_to_register_or_stack(), FFI_ASSERT, FFI_TYPE_LONGDOUBLE, is_hfa(), memcpy, N_V_ARG_REG, N_X_ARG_REG, arg_state::ngrn, and arg_state::nsrn.
Referenced by ffi_call().
|
static |
Definition at line 466 of file ffi.c.
References FFI_ASSERT, get_d_addr(), N_V_ARG_REG, and arg_state::nsrn.
Referenced by allocate_to_register_or_stack(), and ffi_closure_SYSV_inner().
|
static |
Definition at line 591 of file ffi.c.
References allocate_to_d(), allocate_to_stack(), allocate_to_v(), allocate_to_x(), FFI_ASSERT, FFI_TYPE_LONGDOUBLE, get_basic_type_alignment(), N_V_ARG_REG, N_X_ARG_REG, arg_state::ngrn, arg_state::nsrn, and size.
Referenced by copy_to_register_or_stack(), and ffi_closure_SYSV_inner().
|
static |
Definition at line 459 of file ffi.c.
References FFI_ASSERT, get_s_addr(), N_V_ARG_REG, and arg_state::nsrn.
Referenced by ffi_closure_SYSV_inner().
|
static |
Definition at line 481 of file ffi.c.
References ALIGN, arg_state::nsaa, and size.
Referenced by aarch64_prep_args(), allocate_to_register_or_stack(), copy_hfa_to_reg_or_stack(), and ffi_closure_SYSV_inner().
|
static |
Definition at line 473 of file ffi.c.
References FFI_ASSERT, get_v_addr(), N_V_ARG_REG, and arg_state::nsrn.
Referenced by allocate_to_register_or_stack(), copy_hfa_to_reg_or_stack(), and ffi_closure_SYSV_inner().
|
static |
Definition at line 452 of file ffi.c.
References FFI_ASSERT, get_x_addr(), N_X_ARG_REG, and arg_state::ngrn.
Referenced by aarch64_prep_args(), and allocate_to_register_or_stack().
|
static |
Definition at line 422 of file ffi.c.
References arg_state::ngrn, arg_state::nsaa, and arg_state::nsrn.
Referenced by aarch64_prep_args(), and ffi_closure_SYSV_inner().
|
static |
Definition at line 446 of file ffi.c.
References N_V_ARG_REG, and arg_state::nsrn.
Referenced by copy_hfa_to_reg_or_stack(), and ffi_closure_SYSV_inner().
|
static |
Definition at line 437 of file ffi.c.
References N_X_ARG_REG, and arg_state::ngrn.
Referenced by aarch64_prep_args(), and ffi_closure_SYSV_inner().
|
static |
Definition at line 504 of file ffi.c.
References FFI_ASSERT, and FFI_TYPE_LONGDOUBLE.
Referenced by copy_hfa_to_reg_or_stack(), copy_to_register_or_stack(), ffi_call(), and ffi_closure_SYSV_inner().
|
static |
Definition at line 556 of file ffi.c.
References allocate_to_stack(), allocate_to_v(), available_v(), copy_basic_type(), element_count(), get_basic_type_size(), get_homogeneous_type(), memcpy, N_V_ARG_REG, and arg_state::nsrn.
Referenced by aarch64_prep_args().
|
static |
Definition at line 642 of file ffi.c.
References allocate_to_register_or_stack(), and copy_basic_type().
Referenced by aarch64_prep_args().
|
static |
Definition at line 290 of file ffi.c.
Referenced by copy_hfa_to_reg_or_stack(), ffi_call(), ffi_closure_SYSV_inner(), and is_hfa().
void ffi_call | ( | ffi_cif * | cif, |
void(*)(void) | fn, | ||
void * | rvalue, | ||
void ** | avalue | ||
) |
Definition at line 813 of file ffi.c.
References aarch64_prep_args(), ALIGN, extended_cif::avalue, extended_cif::cif, copy_basic_type(), element_count(), FFI_ASSERT, ffi_call_SYSV(), FFI_SYSV, FFI_TYPE_LONGDOUBLE, get_basic_type_addr(), get_basic_type_size(), get_homogeneous_type(), get_x_addr(), is_hfa(), is_register_candidate(), memcpy, N_X_ARG_REG, extended_cif::rvalue, and size.
Referenced by ffi_java_raw_call(), ffi_raw_call(), main(), and nogvl_ffi_call().
void ffi_call_SYSV | ( | unsigned(*)(struct call_context *context, unsigned char *, extended_cif *) | , |
struct call_context * | context, | ||
extended_cif * | , | ||
size_t | , | ||
void(*)(void) | fn | ||
) |
Referenced by ffi_call(), ffi_prep_args(), ffi_prep_cif_machdep(), ffi_prep_cif_machdep_var(), ffi_raw_call(), and get_basic_type_size().
|
inlinestatic |
void ffi_closure_SYSV | ( | ffi_closure * | ) |
Definition at line 420 of file ffi.c.
Referenced by ffi_call(), ffi_prep_closure_loc(), ffi_prep_closure_loc_sysv(), and get_basic_type_size().
void FFI_HIDDEN ffi_closure_SYSV_inner | ( | ffi_closure * | closure, |
struct call_context * | context, | ||
void * | stack | ||
) |
Definition at line 964 of file ffi.c.
References ALIGN, alloca(), allocate_to_d(), allocate_to_register_or_stack(), allocate_to_s(), allocate_to_stack(), allocate_to_v(), arg_init(), available_v(), available_x(), copy_basic_type(), element_count(), FFI_ASSERT, FFI_TYPE_LONGDOUBLE, get_basic_type_addr(), get_basic_type_size(), get_homogeneous_type(), get_x_addr(), is_hfa(), is_register_candidate(), memcpy, N_V_ARG_REG, N_X_ARG_REG, arg_state::ngrn, arg_state::nsrn, NULL, and size.
Referenced by ffi_prep_closure_loc().
ffi_status ffi_prep_cif_machdep | ( | ffi_cif * | cif | ) |
Definition at line 758 of file ffi.c.
References AARCH64_FFI_WITH_V, AARCH64_STACK_ALIGN, ffi_prep_cif_machdep_var(), and is_v_register_candidate().
Referenced by ffi_prep_cif_core(), and ffi_prep_cif_machdep_var().
ffi_status ffi_prep_closure_loc | ( | ffi_closure * | closure, |
ffi_cif * | cif, | ||
void(*)(ffi_cif *, void *, void **, void *) | fun, | ||
void * | user_data, | ||
void * | codeloc | ||
) |
Definition at line 928 of file ffi.c.
References ffi_closure_SYSV(), FFI_HIDDEN, FFI_INIT_TRAMPOLINE, and FFI_SYSV.
Referenced by ffi_call(), ffi_java_raw_call(), ffi_prep_cif_var(), ffi_raw_call(), initialize(), and main().
|
static |
Definition at line 109 of file ffi.c.
References FFI_ASSERT, FFI_TYPE_LONGDOUBLE, get_d_addr(), get_s_addr(), get_v_addr(), get_x_addr(), and NULL.
Referenced by ffi_call(), and ffi_closure_SYSV_inner().
|
static |
Definition at line 144 of file ffi.c.
References FFI_ASSERT, and FFI_TYPE_LONGDOUBLE.
Referenced by allocate_to_register_or_stack().
|
static |
Definition at line 188 of file ffi.c.
References FFI_ASSERT, ffi_call_SYSV(), ffi_closure_SYSV(), and FFI_TYPE_LONGDOUBLE.
Referenced by copy_hfa_to_reg_or_stack(), ffi_call(), and ffi_closure_SYSV_inner().
|
static |
Definition at line 90 of file ffi.c.
References call_context::d, and call_context::v.
Referenced by allocate_to_d(), and get_basic_type_addr().
|
static |
Definition at line 248 of file ffi.c.
Referenced by copy_hfa_to_reg_or_stack(), ffi_call(), ffi_closure_SYSV_inner(), and is_hfa().
|
static |
Definition at line 80 of file ffi.c.
References call_context::d, _d::s, and call_context::v.
Referenced by allocate_to_s(), and get_basic_type_addr().
|
static |
Definition at line 100 of file ffi.c.
References call_context::v.
Referenced by allocate_to_v(), and get_basic_type_addr().
|
static |
Definition at line 74 of file ffi.c.
References call_context::x.
Referenced by allocate_to_x(), ffi_call(), ffi_closure_SYSV_inner(), and get_basic_type_addr().
|
static |
Definition at line 239 of file ffi.c.
References FFI_TYPE_LONGDOUBLE.
Referenced by is_hfa(), and is_v_register_candidate().
|
static |
Definition at line 317 of file ffi.c.
References element_count(), get_homogeneous_type(), and is_floating_type().
Referenced by aarch64_prep_args(), ffi_call(), ffi_closure_SYSV_inner(), is_register_candidate(), and is_v_register_candidate().
|
static |
Definition at line 342 of file ffi.c.
References FFI_ASSERT, FFI_TYPE_LONGDOUBLE, is_hfa(), and N_X_ARG_REG.
Referenced by ffi_call(), and ffi_closure_SYSV_inner().
|
static |
Definition at line 397 of file ffi.c.
References is_floating_type(), and is_hfa().
Referenced by ffi_prep_cif_machdep().