Ruby
2.4.2p198(2017-09-14revision59899)
|
Go to the source code of this file.
Macros | |
#define | ROUND_UP(v, a) (((size_t)(v) + (a) - 1) & ~((a) - 1)) |
#define | MIN_STACK_SIZE 64 |
#define | FIRST_ARG_SLOT 9 |
#define | DEBUG_LEVEL 0 |
#define | fldw(addr, fpreg) __asm__ volatile ("fldw 0(%0), %%" #fpreg "L" : : "r"(addr) : #fpreg) |
#define | fstw(fpreg, addr) __asm__ volatile ("fstw %%" #fpreg "L, 0(%0)" : : "r"(addr)) |
#define | fldd(addr, fpreg) __asm__ volatile ("fldd 0(%0), %%" #fpreg : : "r"(addr) : #fpreg) |
#define | fstd(fpreg, addr) __asm__ volatile ("fstd %%" #fpreg "L, 0(%0)" : : "r"(addr)) |
#define | debug(lvl, x...) do { if (lvl <= DEBUG_LEVEL) { printf(x); } } while (0) |
Functions | |
static int | ffi_struct_type (ffi_type *t) |
void | ffi_prep_args_pa32 (UINT32 *stack, extended_cif *ecif, unsigned bytes) |
static void | ffi_size_stack_pa32 (ffi_cif *cif) |
ffi_status | ffi_prep_cif_machdep (ffi_cif *cif) |
void | ffi_call_pa32 (void(*)(UINT32 *, extended_cif *, unsigned), extended_cif *, unsigned, unsigned, unsigned *, void(*fn)(void)) |
void | ffi_call (ffi_cif *cif, void(*fn)(void), void *rvalue, void **avalue) |
#define debug | ( | lvl, | |
x... | |||
) | do { if (lvl <= DEBUG_LEVEL) { printf(x); } } while (0) |
Definition at line 52 of file ffi.c.
Referenced by ffi_call(), ffi_prep_args_pa32(), ffi_size_stack_pa32(), get_line_info(), Init_syslog(), and load_encoding().
#define FIRST_ARG_SLOT 9 |
Definition at line 40 of file ffi.c.
Referenced by ffi_call(), and ffi_prep_args_pa32().
Definition at line 47 of file ffi.c.
Referenced by ffi_call(), and ffi_prep_args_pa32().
Definition at line 43 of file ffi.c.
Referenced by ffi_call(), and ffi_prep_args_pa32().
Definition at line 49 of file ffi.c.
Referenced by ffi_call().
Definition at line 45 of file ffi.c.
Referenced by ffi_call().
#define MIN_STACK_SIZE 64 |
Definition at line 39 of file ffi.c.
Referenced by ffi_size_stack_pa32().
#define ROUND_UP | ( | v, | |
a | |||
) | (((size_t)(v) + (a) - 1) & ~((a) - 1)) |
Definition at line 37 of file ffi.c.
Referenced by ffi_size_stack_pa32().
void ffi_call | ( | ffi_cif * | cif, |
void(*)(void) | fn, | ||
void * | rvalue, | ||
void ** | avalue | ||
) |
Definition at line 376 of file ffi.c.
References __asm__, alloca(), extended_cif::avalue, extended_cif::cif, debug, FFI_ASSERT, ffi_call_pa32(), ffi_prep_args_pa32(), ffi_prep_closure_loc(), FFI_SIZEOF_ARG, FFI_TYPE_LONGDOUBLE, FFI_TYPE_SMALL_STRUCT2, FFI_TYPE_SMALL_STRUCT3, FFI_TYPE_SMALL_STRUCT4, FFI_TYPE_SMALL_STRUCT5, FFI_TYPE_SMALL_STRUCT6, FFI_TYPE_SMALL_STRUCT7, FFI_TYPE_SMALL_STRUCT8, FIRST_ARG_SLOT, fldd, fldw, fstd, fstw, memcpy, NULL, and extended_cif::rvalue.
void ffi_call_pa32 | ( | void(*)(UINT32 *, extended_cif *, unsigned) | , |
extended_cif * | , | ||
unsigned | , | ||
unsigned | , | ||
unsigned * | , | ||
void(*)(void) | fn | ||
) |
Referenced by ffi_call(), and ffi_prep_cif_machdep().
void ffi_prep_args_pa32 | ( | UINT32 * | stack, |
extended_cif * | ecif, | ||
unsigned | bytes | ||
) |
Definition at line 142 of file ffi.c.
References extended_cif::avalue, extended_cif::cif, debug, FFI_ASSERT, FFI_TYPE_LONGDOUBLE, FIRST_ARG_SLOT, fldd, fldw, len, and memcpy.
Referenced by ffi_call().
ffi_status ffi_prep_cif_machdep | ( | ffi_cif * | cif | ) |
Definition at line 319 of file ffi.c.
References FFI_ASSERT, ffi_call_pa32(), ffi_size_stack_pa32(), ffi_struct_type(), and FFI_TYPE_LONGDOUBLE.
|
static |
Definition at line 278 of file ffi.c.
References debug, FFI_TYPE_LONGDOUBLE, MIN_STACK_SIZE, and ROUND_UP.
Referenced by ffi_prep_cif_machdep().
|
inlinestatic |
Definition at line 54 of file ffi.c.
References FFI_TYPE_SMALL_STRUCT2, FFI_TYPE_SMALL_STRUCT3, FFI_TYPE_SMALL_STRUCT4, FFI_TYPE_SMALL_STRUCT5, FFI_TYPE_SMALL_STRUCT6, FFI_TYPE_SMALL_STRUCT7, and FFI_TYPE_SMALL_STRUCT8.
Referenced by ffi_prep_cif_machdep().