Ruby  2.4.2p198(2017-09-14revision59899)
Macros | Functions
ffi.c File Reference
#include <ffi.h>
#include <ffi_common.h>
#include <stdlib.h>
#include <stdint.h>
#include <sys/cachectl.h>
Include dependency graph for ffi.c:

Go to the source code of this file.

Macros

#define CODE_ENDIAN(x)   ( (((uint32_t) (x)) << 16) | (((uint32_t) (x)) >> 16))
 

Functions

void ffi_prep_args (char *stack, extended_cif *ecif)
 
ffi_status ffi_prep_cif_machdep (ffi_cif *cif)
 
void ffi_call_ARCompact (void(*)(char *, extended_cif *), extended_cif *, unsigned, unsigned, unsigned *, void(*fn)(void))
 
void ffi_call (ffi_cif *cif, void(*fn)(void), void *rvalue, void **avalue)
 
int ffi_closure_inner_ARCompact (ffi_closure *closure, void *rvalue, ffi_arg *args)
 
void ffi_closure_ARCompact (void)
 
ffi_status ffi_prep_closure_loc (ffi_closure *closure, ffi_cif *cif, void(*fun)(ffi_cif *, void *, void **, void *), void *user_data, void *codeloc)
 

Macro Definition Documentation

◆ CODE_ENDIAN

#define CODE_ENDIAN (   x)    ( (((uint32_t) (x)) << 16) | (((uint32_t) (x)) >> 16))

Definition at line 39 of file ffi.c.

Referenced by ffi_prep_closure_loc().

Function Documentation

◆ ffi_call()

void ffi_call ( ffi_cif *  cif,
void(*)(void)  fn,
void *  rvalue,
void **  avalue 
)

◆ ffi_call_ARCompact()

void ffi_call_ARCompact ( void(*)(char *, extended_cif *)  ,
extended_cif ,
unsigned  ,
unsigned  ,
unsigned *  ,
void(*)(void)  fn 
)

Referenced by ffi_call(), and ffi_prep_cif_machdep().

◆ ffi_closure_ARCompact()

void ffi_closure_ARCompact ( void  )

◆ ffi_closure_inner_ARCompact()

int ffi_closure_inner_ARCompact ( ffi_closure *  closure,
void *  rvalue,
ffi_arg args 
)

Definition at line 197 of file ffi.c.

References ALIGN, alloca(), and ffi_closure_ARCompact().

◆ ffi_prep_args()

unsigned int ffi_prep_args ( char *  stack,
extended_cif ecif 
)

Definition at line 46 of file ffi.c.

References ALIGN, extended_cif::avalue, extended_cif::cif, FFI_ASSERT, memcpy, and extended_cif::rvalue.

Referenced by ffi_call().

◆ ffi_prep_cif_machdep()

ffi_status ffi_prep_cif_machdep ( ffi_cif *  cif)

Definition at line 134 of file ffi.c.

References ffi_call_ARCompact().

◆ ffi_prep_closure_loc()

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 243 of file ffi.c.

References CODE_ENDIAN, FFI_ARCOMPACT, FFI_ASSERT, and FFI_TRAMPOLINE_SIZE.