Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

Functions
ffi.c File Reference
`#include <ffi.h>`
`#include <ffi_common.h>`
`#include <stdlib.h>`

Go to the source code of this file.

## Functions
void | ffi_prep_args_v8 (char *stack, extended_cif *ecif)
int | ffi_prep_args_v9 (char *stack, extended_cif *ecif)
ffi_status | ffi_prep_cif_machdep (ffi_cif *cif)
int | ffi_v9_layout_struct (ffi_type *arg, int off, char *ret, char *intg, char *flt)
int | ffi_call_v8 (void *, extended_cif *, unsigned, unsigned, unsigned *, void(*fn)(void))
void | ffi_flush_icache (void *, size_t)
void | ffi_call (ffi_cif *cif, void(*fn)(void), void *rvalue, void **avalue)
void | ffi_closure_v8 (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)
int | ffi_closure_sparc_inner_v8 (ffi_closure *closure, void *rvalue, unsigned long *gpr, unsigned long *scratch)
int | ffi_closure_sparc_inner_v9 (ffi_closure *closure, void *rvalue, unsigned long *gpr, double *fpr)

## Function Documentation

## ◆ ffi_call()

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

Definition at line 383 of file ffi.c.

References alloca, extended_cif::avalue, extended_cif::cif, f, FFI_ASSERT, ffi_call_v8(), ffi_flush_icache(), ffi_prep_args_v8(), ffi_prep_args_v9(), FFI_TYPE_LONGDOUBLE, FFI_V8, FFI_V9, ffi_v9_layout_struct(), long, NULL, and extended_cif::rvalue.

## ◆ ffi_call_v8()

int ffi_call_v8 | ( | void * | ,
|  | extended_cif * | ,
|  | unsigned | ,
|  | unsigned | ,
|  | unsigned * | ,
|  | void(*)(void) | fn
| ) |  |

Referenced by ffi_call().

## ◆ ffi_closure_sparc_inner_v8()

int ffi_closure_sparc_inner_v8 | ( | ffi_closure * | closure,
|  | void * | rvalue,
|  | unsigned long * | gpr,
|  | unsigned long * | scratch
| ) |  |

Definition at line 540 of file ffi.c.

References ALIGN, alloca, FFI_SIZEOF_ARG, FFI_TYPE_LONGDOUBLE, i, and size.

## ◆ ffi_closure_sparc_inner_v9()

int ffi_closure_sparc_inner_v9 | ( | ffi_closure * | closure,
|  | void * | rvalue,
|  | unsigned long * | gpr,
|  | double * | fpr
| ) |  |

Definition at line 605 of file ffi.c.

References ALIGN, alloca, FFI_SIZEOF_ARG, FFI_TYPE_LONGDOUBLE, ffi_v9_layout_struct(), i, and size.

## ◆ ffi_closure_v8()

void ffi_closure_v8 | ( | void |  | ) |

Referenced by ffi_prep_closure_loc().

## ◆ ffi_flush_icache()

void ffi_flush_icache | ( | void * | ,
|  | size_t |
| ) |  |

Referenced by ffi_call(), and ffi_prep_closure_loc().

## ◆ ffi_prep_args_v8()

void ffi_prep_args_v8 | ( | char * | stack,
|  | extended_cif * | ecif
| ) |  |

Definition at line 37 of file ffi.c.

References extended_cif::avalue, extended_cif::cif, FFI_ASSERT, FFI_TYPE_LONGDOUBLE, i, int, memcpy(), and extended_cif::rvalue.

Referenced by ffi_call().

## ◆ ffi_prep_args_v9()

int ffi_prep_args_v9 | ( | char * | stack,
|  | extended_cif * | ecif
| ) |  |

Definition at line 123 of file ffi.c.

References extended_cif::avalue, extended_cif::cif, FFI_ASSERT, FFI_TYPE_LONGDOUBLE, i, long, 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 252 of file ffi.c.

References ALIGN, FFI_TYPE_LONGDOUBLE, and FFI_V9.

## ◆ 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 489 of file ffi.c.

References ffi_closure_v8(), ffi_flush_icache(), FFI_V8, FFI_V9, if(), and long.

## ◆ ffi_v9_layout_struct()

int ffi_v9_layout_struct | ( | ffi_type * | arg,
|  | int | off,
|  | char * | ret,
|  | char * | intg,
|  | char * | flt
| ) |  |

Definition at line 337 of file ffi.c.

References ALIGN, arg, FFI_SIZEOF_ARG, FFI_TYPE_LONGDOUBLE, memmove, NULL, and ptr.

Referenced by ffi_call(), and ffi_closure_sparc_inner_v9().