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

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

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

Go to the source code of this file.

## Macros
#define | HI(x) ((((unsigned int) (x)) >> 16) & 0xffff)
#define | LO(x) (((unsigned int) (x)) & 0xffff)

## Functions
UINT64 | ffi_call_sysv (void(*)(char *, extended_cif *), extended_cif *, unsigned, void(*fn)(void))
void | ffi_closure_sysv (void)
ffi_status | ffi_prep_cif_machdep (ffi_cif *cif)
void | ffi_prep_args (char *stack, extended_cif *ecif)
void | ffi_call (ffi_cif *cif, void(*fn)(void), void *rvalue, void **avalue)
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

## ◆ HI

#define HI | ( |  | x | ) | ((((unsigned int) (x)) >> 16) & 0xffff)

## ◆ LO

#define LO | ( |  | x | ) | (((unsigned int) (x)) & 0xffff)

## Function Documentation

## ◆ ffi_call()

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

Definition at line 150 of file ffi.c.

References alloca, extended_cif::avalue, extended_cif::cif, ffi_call_sysv(), ffi_prep_args(), memcpy, NULL, and extended_cif::rvalue.

## ◆ ffi_call_sysv()

UINT64 ffi_call_sysv | ( | void(*)(char *, extended_cif *) | ,
|  | extended_cif * | ,
|  | unsigned | ,
|  | void(*)(void) | fn
| ) |  |

Referenced by ffi_call().

## ◆ ffi_closure_sysv()

void ffi_closure_sysv | ( | void |  | ) |

Referenced by ffi_prep_closure_loc().

## ◆ ffi_prep_args()

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

Definition at line 81 of file ffi.c.

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

## ◆ ffi_prep_cif_machdep()

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

Definition at line 60 of file ffi.c.

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

References ffi_closure_sysv(), FFI_SYSV, HI, if(), and LO.