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

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

Data Structures | Macros | Typedefs | Functions
ffi.c File Reference
`#include <ffi.h>`
`#include <ffi_common.h>`
`#include <stdlib.h>`
`#include <stdbool.h>`
`#include <float.h>`
`#include "ia64_flags.h"`

Go to the source code of this file.

## Data Structures
struct | fpreg
struct | ia64_args

## Macros
#define | stf_spill(addr, value) asm ("stf.spill %0 = %1%P0" : "=m" (*addr) : "f"(value));
#define | ldf_fill(result, addr) asm ("ldf.fill %0 = %1%P1" : "=f"(result) : "m"(*addr));

## Typedefs
typedef void *PTR64 | __attribute__((mode(DI)))

## Functions
ffi_status | ffi_prep_cif_machdep (ffi_cif *cif)
int | ffi_call_unix (struct ia64_args *, PTR64, void(*)(void), UINT64)
void | ffi_call (ffi_cif *cif, void(*fn)(void), void *rvalue, void **avalue)
void | ffi_closure_unix ()
ffi_status | ffi_prep_closure_loc (ffi_closure *closure, ffi_cif *cif, void(*fun)(ffi_cif *, void *, void **, void *), void *user_data, void *codeloc)
UINT64 | ffi_closure_unix_inner (ffi_closure *closure, struct ia64_args *stack, void *rvalue, void *r8)

## Macro Definition Documentation

## ◆ ldf_fill

#define ldf_fill | ( |  | result,
|  |  | addr
| ) |  | asm ("ldf.fill %0 = %1%P1" : "=f"(result) : "m"(*addr));

Definition at line 85 of file ffi.c.

## ◆ stf_spill

#define stf_spill | ( |  | addr,
|  |  | value
| ) |  | asm ("stf.spill %0 = %1%P0" : "=m" (*addr) : "f"(value));

Definition at line 79 of file ffi.c.

## Typedef Documentation

## ◆ __attribute__

typedef signed int ffi_sarg __attribute__((__mode__(__DI__)))

Definition at line 41 of file ffi.c.

## Function Documentation

## ◆ ffi_call()

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

Definition at line 277 of file ffi.c.

References alloca, FFI_ASSERT, ffi_call_unix(), FFI_TYPE_LONGDOUBLE, FFI_UNIX, ia64_args::fp_regs, ia64_args::gp_regs, memcpy, NULL, and stf_spill.

## ◆ ffi_call_unix()

int ffi_call_unix | ( | struct ia64_args * | ,
|  | PTR64 | ,
|  | void(*)(void) | ,
|  | UINT64 |
| ) |  |

Referenced by ffi_call().

## ◆ ffi_closure_unix()

void ffi_closure_unix | ( |  | ) |

Referenced by ffi_prep_closure_loc().

## ◆ ffi_closure_unix_inner()

UINT64 ffi_closure_unix_inner | ( | ffi_closure * | closure,
|  | struct ia64_args * | stack,
|  | void * | rvalue,
|  | void * | r8
| ) |  |

Definition at line 451 of file ffi.c.

References alloca, FFI_ASSERT, FFI_TYPE_LONGDOUBLE, ia64_args::fp_regs, ia64_args::gp_regs, ldf_fill, and memcpy.

## ◆ ffi_prep_cif_machdep()

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

Definition at line 224 of file ffi.c.

References FFI_IA64_TYPE_SMALL_STRUCT, FFI_TYPE_LONGDOUBLE, and offsetof.

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

References ffi_closure_unix(), and FFI_UNIX.