Ruby: ext/fiddle/libffi-3.2.1/src/bfin/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>`
`#include <stdio.h>`

Go to the source code of this file.

## Macros
#define | MAX_GPRARGS 3
#define | FFIBFIN_RET_VOID 0
#define | FFIBFIN_RET_BYTE 1
#define | FFIBFIN_RET_HALFWORD 2
#define | FFIBFIN_RET_INT64 3
#define | FFIBFIN_RET_INT32 4

## Functions
void | ffi_prep_args (unsigned char *, extended_cif *)
void | ffi_call_SYSV (unsigned, extended_cif *, void(*)(unsigned char *, extended_cif *), unsigned, void *, void(*fn)(void))
ffi_status | ffi_prep_cif_machdep (ffi_cif *cif)
void | ffi_call (ffi_cif *cif, void(*fn)(void), void *rvalue, void **avalue)

## Macro Definition Documentation

## ◆ FFIBFIN_RET_BYTE

#define FFIBFIN_RET_BYTE 1

Definition at line 40 of file ffi.c.

## ◆ FFIBFIN_RET_HALFWORD

#define FFIBFIN_RET_HALFWORD 2

Definition at line 41 of file ffi.c.

## ◆ FFIBFIN_RET_INT32

#define FFIBFIN_RET_INT32 4

Definition at line 43 of file ffi.c.

## ◆ FFIBFIN_RET_INT64

#define FFIBFIN_RET_INT64 3

Definition at line 42 of file ffi.c.

## ◆ FFIBFIN_RET_VOID

#define FFIBFIN_RET_VOID 0

Definition at line 39 of file ffi.c.

## ◆ MAX_GPRARGS

#define MAX_GPRARGS 3

Definition at line 34 of file ffi.c.

## Function Documentation

## ◆ ffi_call()

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

Definition at line 120 of file ffi.c.

References extended_cif::avalue, extended_cif::cif, FFI_ASSERT, ffi_call_SYSV(), ffi_prep_args(), FFI_SYSV, and extended_cif::rvalue.

## ◆ ffi_call_SYSV()

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

## ◆ ffi_prep_args()

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

Definition at line 144 of file ffi.c.

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

## ◆ ffi_prep_cif_machdep()

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

Definition at line 67 of file ffi.c.

References FFI_ASSERT, FFIBFIN_RET_BYTE, FFIBFIN_RET_HALFWORD, FFIBFIN_RET_INT32, FFIBFIN_RET_INT64, and FFIBFIN_RET_VOID.