Ruby: ext/fiddle/libffi-3.2.1/src/arm/ffi.c File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

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

Go to the source code of this file.

## Macros
#define | FFI_INIT_TRAMPOLINE(TRAMP, FUN, CTX)

## Functions
int | ffi_prep_args_SYSV (char *stack, extended_cif *ecif, float *vfp_space)
int | ffi_prep_args_VFP (char *stack, extended_cif *ecif, float *vfp_space)
ffi_status | ffi_prep_cif_machdep (ffi_cif *cif)
ffi_status | ffi_prep_cif_machdep_var (ffi_cif *cif, unsigned int nfixedargs, unsigned int ntotalargs)
void | ffi_call_SYSV (void(*fn)(void), extended_cif *, unsigned, unsigned, unsigned *)
void | ffi_call_VFP (void(*fn)(void), extended_cif *, unsigned, unsigned, unsigned *)
void | ffi_call (ffi_cif *cif, void(*fn)(void), void *rvalue, void **avalue)
void | ffi_closure_SYSV (ffi_closure *)
void | ffi_closure_VFP (ffi_closure *)
unsigned int FFI_HIDDEN | ffi_closure_inner (ffi_closure *closure, void **respp, void *args, void *vfp_args)
ffi_status | ffi_prep_closure_loc (ffi_closure *closure, ffi_cif *cif, void(*fun)(ffi_cif *, void *, void **, void *), void *user_data, void *codeloc)

## Variables
unsigned int | ffi_arm_trampoline [3]

## Macro Definition Documentation

## ◆ FFI_INIT_TRAMPOLINE

#define FFI_INIT_TRAMPOLINE | ( |  | TRAMP,
|  |  | FUN,
|  |  | CTX
| ) |  |

Value:
({ unsigned char *__tramp = (unsigned char*)(TRAMP); \
unsigned int __fun = (unsigned int)(FUN); \
unsigned int __ctx = (unsigned int)(CTX); \
unsigned char *insns = (unsigned char *)(CTX); \
memcpy (__tramp, ffi_arm_trampoline, sizeof ffi_arm_trampoline); \
*(unsigned int*) &__tramp[12] = __ctx; \
*(unsigned int*) &__tramp[16] = __fun; \
__clear_cache((&__tramp[0]), (&__tramp[19])); /* Clear data mapping. */ \
__clear_cache(insns, insns + 3 * sizeof (unsigned int)); \
/* Clear instruction \
mapping. */ \
})
ffi_arm_trampoline
unsigned int ffi_arm_trampoline[3]
int
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque

Definition at line 754 of file ffi.c.

## Function Documentation

## ◆ ffi_call()

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

Definition at line 304 of file ffi.c.

References alloca, extended_cif::avalue, extended_cif::cif, FFI_ASSERT, ffi_call_SYSV(), ffi_call_VFP(), FFI_SYSV, FFI_TYPE_STRUCT_VFP_DOUBLE, FFI_TYPE_STRUCT_VFP_FLOAT, FFI_VFP, memcpy, NULL, and extended_cif::rvalue.

## ◆ ffi_call_SYSV()

void ffi_call_SYSV | ( | void(*)(void) | fn,
|  | extended_cif * | ,
|  | unsigned | ,
|  | unsigned | ,
|  | unsigned * |
| ) |  |

## ◆ ffi_call_VFP()

void ffi_call_VFP | ( | void(*)(void) | fn,
|  | extended_cif * | ,
|  | unsigned | ,
|  | unsigned | ,
|  | unsigned * |
| ) |  |

Referenced by ffi_call().

## ◆ ffi_closure_inner()

unsigned int FFI_HIDDEN ffi_closure_inner | ( | ffi_closure * | closure,
|  | void ** | respp,
|  | void * | args,
|  | void * | vfp_args
| ) |  |

Definition at line 381 of file ffi.c.

References alloca, and FFI_VFP.

## ◆ ffi_closure_SYSV()

void ffi_closure_SYSV | ( | ffi_closure * |  | ) |

Definition at line 420 of file ffi.c.

## ◆ ffi_closure_VFP()

void ffi_closure_VFP | ( | ffi_closure * |  | ) |

Referenced by ffi_prep_closure_loc().

## ◆ ffi_prep_args_SYSV()

int ffi_prep_args_SYSV | ( | char * | stack,
|  | extended_cif * | ecif,
|  | float * | vfp_space
| ) |  |

Definition at line 128 of file ffi.c.

References extended_cif::avalue, extended_cif::cif, and extended_cif::rvalue.

## ◆ ffi_prep_args_VFP()

int ffi_prep_args_VFP | ( | char * | stack,
|  | extended_cif * | ecif,
|  | float * | vfp_space
| ) |  |

Definition at line 155 of file ffi.c.

References extended_cif::avalue, extended_cif::cif, FFI_ASSERT, FFI_VFP, and extended_cif::rvalue.

## ◆ ffi_prep_cif_machdep()

ffi_status ffi_prep_cif_machdep | ( | ffi_cif * | cif | ) |

Definition at line 234 of file ffi.c.

References FFI_VFP.

## ◆ ffi_prep_cif_machdep_var()

ffi_status ffi_prep_cif_machdep_var | ( | ffi_cif * | cif,
|  | unsigned int nfixedargs nfixedargs | ,
|  | unsigned int ntotalargs ntotalargs |
| ) |  |

Definition at line 289 of file ffi.c.

References ffi_prep_cif_machdep(), FFI_SYSV, and FFI_VFP.

Referenced by ffi_prep_cif_core().

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

References ffi_closure_SYSV(), ffi_closure_VFP(), FFI_INIT_TRAMPOLINE, FFI_SYSV, FFI_VFP, and NULL.

## Variable Documentation

## ◆ ffi_arm_trampoline

unsigned int ffi_arm_trampoline[3]
| extern