Ruby  2.4.2p198(2017-09-14revision59899)
Data Structures | Macros | Typedefs | Enumerations | Functions
ffi_darwin.c File Reference
#include <ffi.h>
#include <ffi_common.h>
#include <stdlib.h>
Include dependency graph for ffi_darwin.c:

Go to the source code of this file.

Data Structures

struct  aix_fd_struct
 
union  ffi_dblfl
 

Macros

#define MIN_LINE_SIZE   32
 

Typedefs

typedef struct aix_fd_struct aix_fd
 

Enumerations

enum  {
  FLAG_RETURNS_128BITS = 1 << (31-31), FLAG_RETURNS_NOTHING = 1 << (31-30), FLAG_RETURNS_FP = 1 << (31-29), FLAG_RETURNS_64BITS = 1 << (31-28),
  FLAG_RETURNS_STRUCT = 1 << (31-27), FLAG_ARG_NEEDS_COPY = 1 << (31- 7), FLAG_FP_ARGUMENTS = 1 << (31- 6), FLAG_4_GPR_ARGUMENTS = 1 << (31- 5),
  FLAG_RETVAL_REFERENCE = 1 << (31- 4)
}
 
enum  { NUM_GPR_ARG_REGISTERS = 8, NUM_FPR_ARG_REGISTERS = 13, LINKAGE_AREA_GPRS = 6 }
 
enum  { ASM_NEEDS_REGISTERS = 4 }
 

Functions

void ffi_closure_ASM (void)
 
void ffi_prep_args (extended_cif *ecif, unsigned long *const stack)
 
static void darwin_adjust_aggregate_sizes (ffi_type *s)
 
static void aix_adjust_aggregate_sizes (ffi_type *s)
 
ffi_status ffi_prep_cif_machdep (ffi_cif *cif)
 
void ffi_call_AIX (extended_cif *, long, unsigned, unsigned *, void(*fn)(void), void(*fn2)(void))
 
void ffi_call_DARWIN (extended_cif *, long, unsigned, unsigned *, void(*fn)(void), void(*fn2)(void), ffi_type *)
 
void ffi_call (ffi_cif *cif, void(*fn)(void), void *rvalue, void **avalue)
 
static void flush_icache (char *)
 
static void flush_range (char *, int)
 
ffi_status ffi_prep_closure_loc (ffi_closure *closure, ffi_cif *cif, void(*fun)(ffi_cif *, void *, void **, void *), void *user_data, void *codeloc)
 
ffi_type * ffi_closure_helper_DARWIN (ffi_closure *, void *, unsigned long *, ffi_dblfl *)
 

Macro Definition Documentation

◆ MIN_LINE_SIZE

#define MIN_LINE_SIZE   32

Referenced by flush_range().

Typedef Documentation

◆ aix_fd

typedef struct aix_fd_struct aix_fd

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
FLAG_RETURNS_128BITS 
FLAG_RETURNS_NOTHING 
FLAG_RETURNS_FP 
FLAG_RETURNS_64BITS 
FLAG_RETURNS_STRUCT 
FLAG_ARG_NEEDS_COPY 
FLAG_FP_ARGUMENTS 
FLAG_4_GPR_ARGUMENTS 
FLAG_RETVAL_REFERENCE 

Definition at line 37 of file ffi_darwin.c.

◆ anonymous enum

anonymous enum
Enumerator
NUM_GPR_ARG_REGISTERS 
NUM_FPR_ARG_REGISTERS 
LINKAGE_AREA_GPRS 

Definition at line 57 of file ffi_darwin.c.

◆ anonymous enum

anonymous enum
Enumerator
ASM_NEEDS_REGISTERS 

Definition at line 63 of file ffi_darwin.c.

Function Documentation

◆ aix_adjust_aggregate_sizes()

static void aix_adjust_aggregate_sizes ( ffi_type *  s)
static

Definition at line 625 of file ffi_darwin.c.

References ALIGN, and NULL.

Referenced by ffi_prep_cif_machdep().

◆ darwin_adjust_aggregate_sizes()

static void darwin_adjust_aggregate_sizes ( ffi_type *  s)
static

Definition at line 576 of file ffi_darwin.c.

References ALIGN, and NULL.

Referenced by ffi_prep_cif_machdep().

◆ ffi_call()

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

◆ ffi_call_AIX()

void ffi_call_AIX ( extended_cif ,
long  ,
unsigned  ,
unsigned *  ,
void(*)(void)  fn,
void(*)(void)  fn2 
)

Referenced by ffi_call(), and ffi_prep_cif_machdep().

◆ ffi_call_DARWIN()

void ffi_call_DARWIN ( extended_cif ,
long  ,
unsigned  ,
unsigned *  ,
void(*)(void)  fn,
void(*)(void)  fn2,
ffi_type *   
)

Referenced by ffi_call(), and ffi_prep_cif_machdep().

◆ ffi_closure_ASM()

void ffi_closure_ASM ( void  )

Referenced by ffi_prep_closure_loc().

◆ ffi_closure_helper_DARWIN()

ffi_type * ffi_closure_helper_DARWIN ( ffi_closure *  closure,
void *  rvalue,
unsigned long *  pgr,
ffi_dblfl pfr 
)

◆ ffi_prep_args()

void ffi_prep_args ( extended_cif ecif,
unsigned long *const  stack 
)

◆ ffi_prep_cif_machdep()

ffi_status ffi_prep_cif_machdep ( ffi_cif *  cif)

◆ 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 
)

◆ flush_icache()

static void flush_icache ( char *  addr)
static

Definition at line 1078 of file ffi_darwin.c.

References __asm__.

Referenced by ffi_call(), and flush_range().

◆ flush_range()

static void flush_range ( char *  addr1,
int  size 
)
static

Definition at line 1092 of file ffi_darwin.c.

References flush_icache(), MIN_LINE_SIZE, and size.

Referenced by ffi_call(), and ffi_prep_closure_loc().