Ruby: ext/fiddle/libffi-3.2.1/src/tile/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>`
`#include <stdint.h>`
`#include <unistd.h>`
`#include <arch/abi.h>`
`#include <arch/icache.h>`
`#include <arch/opcode.h>`

Go to the source code of this file.

## Macros
#define | NUM_ARG_REGS 10

## Functions
void | ffi_call_tile (ffi_sarg reg_args[NUM_ARG_REGS], const ffi_sarg *stack_args, size_t stack_args_bytes, void(*fnaddr)(void)) FFI_HIDDEN
void | ffi_closure_tile (void)
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)
void FFI_HIDDEN | ffi_closure_tile_inner (ffi_closure *closure, ffi_sarg reg_args[2][NUM_ARG_REGS], ffi_sarg *stack_args)

## Variables
const UINT64 ffi_template_tramp_tile[] | FFI_HIDDEN

## Macro Definition Documentation

## ◆ NUM_ARG_REGS

#define NUM_ARG_REGS 10

Definition at line 38 of file ffi.c.

## Function Documentation

## ◆ ffi_call()

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

Definition at line 145 of file ffi.c.

References alloca, ffi_call_tile(), FFI_SIZEOF_ARG, memcpy, NULL, and NUM_ARG_REGS.

## ◆ ffi_call_tile()

void ffi_call_tile | ( | ffi_sarg | reg_args[NUM_ARG_REGS],
|  | const ffi_sarg * | stack_args,
|  | size_t | stack_args_bytes,
|  | void(*)(void) | fnaddr
| ) |  |

Referenced by ffi_call().

## ◆ ffi_closure_tile()

void ffi_closure_tile | ( | void |  | ) |

Definition at line 50 of file ffi.c.

References FFI_SIZEOF_ARG, and NUM_ARG_REGS.

Referenced by ffi_prep_closure_loc().

## ◆ ffi_closure_tile_inner()

void FFI_HIDDEN ffi_closure_tile_inner | ( | ffi_closure * | closure,
|  | ffi_sarg | reg_args[2][NUM_ARG_REGS],
|  | ffi_sarg * | stack_args
| ) |  |

Definition at line 285 of file ffi.c.

References alloca, FFI_SIZEOF_ARG, NUM_ARG_REGS, and u64.

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

References ffi_closure_tile(), FFI_UNIX, and out.

## Variable Documentation

## ◆ FFI_HIDDEN

const UINT64 ffi_template_tramp_tile [] FFI_HIDDEN
| extern