#include <ffi.h>
#include <ffi_common.h>
#include <stdlib.h>
#include <stdio.h>
Go to the source code of this file.
|
#define | ROUND_UP(v, a) (((size_t)(v) + (a) - 1) & ~((a) - 1)) |
|
#define | MIN_STACK_SIZE 64 |
|
#define | FIRST_ARG_SLOT 9 |
|
#define | DEBUG_LEVEL 0 |
|
#define | fldw(addr, fpreg) __asm__ volatile ("fldw 0(%0), %%" #fpreg "L" : : "r"(addr) : #fpreg) |
|
#define | fstw(fpreg, addr) __asm__ volatile ("fstw %%" #fpreg "L, 0(%0)" : : "r"(addr)) |
|
#define | fldd(addr, fpreg) __asm__ volatile ("fldd 0(%0), %%" #fpreg : : "r"(addr) : #fpreg) |
|
#define | fstd(fpreg, addr) __asm__ volatile ("fstd %%" #fpreg "L, 0(%0)" : : "r"(addr)) |
|
#define | debug(lvl, x...) do { if (lvl <= DEBUG_LEVEL) { printf(x); } } while (0) |
|
|
void | ffi_prep_args_pa32 (UINT32 *stack, extended_cif *ecif, unsigned bytes) |
|
ffi_status | ffi_prep_cif_machdep (ffi_cif *cif) |
|
void | ffi_call_pa32 (void(*)(UINT32 *, extended_cif *, unsigned), extended_cif *, unsigned, unsigned, unsigned *, void(*fn)(void)) |
|
void | ffi_call (ffi_cif *cif, void(*fn)(void), void *rvalue, void **avalue) |
|
◆ debug
#define debug |
( |
|
lvl, |
|
|
|
x... |
|
) |
| do { if (lvl <= DEBUG_LEVEL) { printf(x); } } while (0) |
Definition at line 52 of file ffi.c.
◆ DEBUG_LEVEL
Definition at line 41 of file ffi.c.
◆ FIRST_ARG_SLOT
Definition at line 40 of file ffi.c.
◆ fldd
#define fldd |
( |
|
addr, |
|
|
|
fpreg |
|
) |
| __asm__ volatile ("fldd 0(%0), %%" #fpreg : : "r"(addr) : #fpreg) |
Definition at line 47 of file ffi.c.
◆ fldw
#define fldw |
( |
|
addr, |
|
|
|
fpreg |
|
) |
| __asm__ volatile ("fldw 0(%0), %%" #fpreg "L" : : "r"(addr) : #fpreg) |
Definition at line 43 of file ffi.c.
◆ fstd
#define fstd |
( |
|
fpreg, |
|
|
|
addr |
|
) |
| __asm__ volatile ("fstd %%" #fpreg "L, 0(%0)" : : "r"(addr)) |
Definition at line 49 of file ffi.c.
◆ fstw
#define fstw |
( |
|
fpreg, |
|
|
|
addr |
|
) |
| __asm__ volatile ("fstw %%" #fpreg "L, 0(%0)" : : "r"(addr)) |
Definition at line 45 of file ffi.c.
◆ MIN_STACK_SIZE
#define MIN_STACK_SIZE 64 |
Definition at line 39 of file ffi.c.
◆ ROUND_UP
#define ROUND_UP |
( |
|
v, |
|
|
|
a |
|
) |
| (((size_t)(v) + (a) - 1) & ~((a) - 1)) |
Definition at line 37 of file ffi.c.
◆ ffi_call()
void ffi_call |
( |
ffi_cif * |
cif, |
|
|
void(*)(void) |
fn, |
|
|
void * |
rvalue, |
|
|
void ** |
avalue |
|
) |
| |
◆ ffi_call_pa32()
◆ ffi_prep_args_pa32()
◆ ffi_prep_cif_machdep()
ffi_status ffi_prep_cif_machdep |
( |
ffi_cif * |
cif | ) |
|