Ruby: ext/fiddle/libffi-3.2.1/src/m68k/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 <unistd.h>`
`#include <sys/syscall.h>`
`#include <asm/cachectl.h>`

Go to the source code of this file.

## Macros
#define | CIF_FLAGS_INT 1
#define | CIF_FLAGS_DINT 2
#define | CIF_FLAGS_FLOAT 4
#define | CIF_FLAGS_DOUBLE 8
#define | CIF_FLAGS_LDOUBLE 16
#define | CIF_FLAGS_POINTER 32
#define | CIF_FLAGS_STRUCT1 64
#define | CIF_FLAGS_STRUCT2 128
#define | CIF_FLAGS_SINT8 256
#define | CIF_FLAGS_SINT16 512

## Functions
void | ffi_call_SYSV (extended_cif *, unsigned, unsigned, void *, void(*fn)())
void * | ffi_prep_args (void *stack, extended_cif *ecif)
void | ffi_closure_SYSV (ffi_closure *)
void | ffi_closure_struct_SYSV (ffi_closure *)
unsigned int | ffi_closure_SYSV_inner (ffi_closure *closure, void *resp, void *args)
ffi_status | ffi_prep_cif_machdep (ffi_cif *cif)
void | ffi_call (ffi_cif *cif, void(*fn)(), 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

## ◆ CIF_FLAGS_DINT

#define CIF_FLAGS_DINT 2

Definition at line 119 of file ffi.c.

## ◆ CIF_FLAGS_DOUBLE

#define CIF_FLAGS_DOUBLE 8

Definition at line 121 of file ffi.c.

## ◆ CIF_FLAGS_FLOAT

#define CIF_FLAGS_FLOAT 4

Definition at line 120 of file ffi.c.

## ◆ CIF_FLAGS_INT

#define CIF_FLAGS_INT 1

Definition at line 118 of file ffi.c.

## ◆ CIF_FLAGS_LDOUBLE

#define CIF_FLAGS_LDOUBLE 16

Definition at line 122 of file ffi.c.

## ◆ CIF_FLAGS_POINTER

#define CIF_FLAGS_POINTER 32

Definition at line 123 of file ffi.c.

## ◆ CIF_FLAGS_SINT16

#define CIF_FLAGS_SINT16 512

Definition at line 127 of file ffi.c.

## ◆ CIF_FLAGS_SINT8

#define CIF_FLAGS_SINT8 256

Definition at line 126 of file ffi.c.

## ◆ CIF_FLAGS_STRUCT1

#define CIF_FLAGS_STRUCT1 64

Definition at line 124 of file ffi.c.

## ◆ CIF_FLAGS_STRUCT2

#define CIF_FLAGS_STRUCT2 128

Definition at line 125 of file ffi.c.

## Function Documentation

## ◆ ffi_call()

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

Definition at line 222 of file ffi.c.

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

## ◆ ffi_call_SYSV()

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

## ◆ ffi_closure_struct_SYSV()

void ffi_closure_struct_SYSV | ( | ffi_closure * |  | ) |

Referenced by ffi_prep_closure_loc().

## ◆ ffi_closure_SYSV()

void ffi_closure_SYSV | ( | ffi_closure * |  | ) |

Definition at line 420 of file ffi.c.

## ◆ ffi_closure_SYSV_inner()

unsigned int ffi_closure_SYSV_inner | ( | ffi_closure * | closure,
|  | void * | resp,
|  | void * | args
| ) |  |

Definition at line 309 of file ffi.c.

References alloca.

## ◆ ffi_prep_args()

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

Definition at line 37 of file ffi.c.

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

## ◆ ffi_prep_cif_machdep()

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

Definition at line 131 of file ffi.c.

References CIF_FLAGS_DINT, CIF_FLAGS_DOUBLE, CIF_FLAGS_FLOAT, CIF_FLAGS_INT, CIF_FLAGS_LDOUBLE, CIF_FLAGS_POINTER, CIF_FLAGS_SINT16, CIF_FLAGS_SINT8, CIF_FLAGS_STRUCT1, CIF_FLAGS_STRUCT2, and FFI_TYPE_LONGDOUBLE.

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

References ffi_closure_struct_SYSV(), ffi_closure_SYSV(), FFI_SYSV, FFI_TRAMPOLINE_SIZE, and FFI_TYPE_LONGDOUBLE.