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

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

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

Go to the source code of this file.

## Functions
void | ffi_prep_args_v8 (char *stack, extended_cif *ecif)
int | ffi_prep_args_v9 (char *stack, extended_cif *ecif)
ffi_status | ffi_prep_cif_machdep (ffi_cif *cif)
int | ffi_v9_layout_struct (ffi_type *arg, int off, char *ret, char *intg, char *flt)
int | ffi_call_v8 (void *, extended_cif *, unsigned, unsigned, unsigned *, void(*fn)(void))
void | ffi_call (ffi_cif *cif, void(*fn)(void), void *rvalue, void **avalue)
void | ffi_closure_v8 (void)
ffi_status | ffi_prep_closure_loc (ffi_closure *closure, ffi_cif *cif, void(*fun)(ffi_cif *, void *, void **, void *), void *user_data, void *codeloc)
int | ffi_closure_sparc_inner_v8 (ffi_closure *closure, void *rvalue, unsigned long *gpr, unsigned long *scratch)
int | ffi_closure_sparc_inner_v9 (ffi_closure *closure, void *rvalue, unsigned long *gpr, double *fpr)

## Function Documentation

## ◆ ffi_call()

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

Definition at line 383 of file ffi.c.

References alloca, extended_cif::avalue, extended_cif::cif, f, FFI_ASSERT, ffi_call_v8(), ffi_prep_args_v8(), ffi_prep_args_v9(), FFI_TYPE_LONGDOUBLE, FFI_V8, FFI_V9, ffi_v9_layout_struct(), long(), NULL, and extended_cif::rvalue.

## ◆ ffi_call_v8()

int ffi_call_v8 | ( | void * | ,
|  | extended_cif * | ,
|  | unsigned | ,
|  | unsigned | ,
|  | unsigned * | ,
|  | void(*)(void) | fn
| ) |  |

Referenced by ffi_call().

## ◆ ffi_closure_sparc_inner_v8()

int ffi_closure_sparc_inner_v8 | ( | ffi_closure * | closure,
|  | void * | rvalue,
|  | unsigned long * | gpr,
|  | unsigned long * | scratch
| ) |  |

Definition at line 540 of file ffi.c.

References ALIGN, alloca, FFI_SIZEOF_ARG, and FFI_TYPE_LONGDOUBLE.

## ◆ ffi_closure_sparc_inner_v9()

int ffi_closure_sparc_inner_v9 | ( | ffi_closure * | closure,
|  | void * | rvalue,
|  | unsigned long * | gpr,
|  | double * | fpr
| ) |  |

Definition at line 605 of file ffi.c.

References ALIGN, alloca, FFI_SIZEOF_ARG, FFI_TYPE_LONGDOUBLE, and ffi_v9_layout_struct().

## ◆ ffi_closure_v8()

void ffi_closure_v8 | ( | void |  | ) |

Referenced by ffi_prep_closure_loc().

## ◆ ffi_prep_args_v8()

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

Definition at line 37 of file ffi.c.

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

Referenced by ffi_call().

## ◆ ffi_prep_args_v9()

int ffi_prep_args_v9 | ( | char * | stack,
|  | extended_cif * | ecif
| ) |  |

Definition at line 123 of file ffi.c.

References extended_cif::avalue, extended_cif::cif, FFI_ASSERT, FFI_TYPE_LONGDOUBLE, long(), memcpy, and extended_cif::rvalue.

Referenced by ffi_call().

## ◆ ffi_prep_cif_machdep()

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

Definition at line 252 of file ffi.c.

References ALIGN, FFI_TYPE_LONGDOUBLE, and FFI_V9.

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

References ffi_closure_v8(), FFI_V8, FFI_V9, if(), and long().

## ◆ ffi_v9_layout_struct()

int ffi_v9_layout_struct | ( | ffi_type * | arg,
|  | int | off,
|  | char * | ret,
|  | char * | intg,
|  | char * | flt
| ) |  |

Definition at line 337 of file ffi.c.

References ALIGN, FFI_SIZEOF_ARG, FFI_TYPE_LONGDOUBLE, ffi_v9_layout_struct(), memmove(), NULL, and ptr.

Referenced by ffi_call(), ffi_closure_sparc_inner_v9(), and ffi_v9_layout_struct().