potion
0.2
|
some assembler macros More...
Go to the source code of this file.
Data Structures | |
struct | PNJumps |
record labels to be patched More... | |
Macros | |
#define | ASM_UNIT 512 |
#define | ASM_TPL_IMM 1024 |
#define | MAKE_TARGET(arch) |
#define | PN_HAS_UPVALS(v) |
#define | ASM(ins) *asmp = potion_asm_put(P, *asmp, (PN)(ins), sizeof(u8)) |
#define | ASM2(pn) *asmp = potion_asm_put(P, *asmp, (PN)(pn), 2) |
#define | ASMI(pn) *asmp = potion_asm_put(P, *asmp, (PN)(pn), sizeof(int)) |
#define | ASMN(pn) *asmp = potion_asm_put(P, *asmp, (PN)(pn), sizeof(PN)) |
#define | ASMS(cstr) *asmp = potion_asm_write(P, *asmp, cstr, sizeof(cstr)-1) |
Functions | |
PNAsm * | potion_asm_new (Potion *) |
PNAsm * | potion_asm_clear (Potion *, PNAsm *) |
PNAsm * | potion_asm_put (Potion *, PNAsm *, PN, size_t) |
PNAsm * | potion_asm_op (Potion *, PNAsm *, u8, int, int) |
PNAsm * | potion_asm_write (Potion *, PNAsm *, char *, size_t) |
some assembler macros
(c) 2008 why the lucky stiff, the freelance professor (c) 2014 perl11.org
PNAsm(vt = PN_TUSER, siz, ptr, len) -> PNFlex(vt = PN_TUSER, siz, ...) overhead of 6 words on x86, but don't have to do constant forwarding tricks.
Definition in file asm.h.
#define PN_HAS_UPVALS | ( | v | ) |
#define ASM | ( | ins | ) | *asmp = potion_asm_put(P, *asmp, (PN)(ins), sizeof(u8)) |
#define ASM2 | ( | pn | ) | *asmp = potion_asm_put(P, *asmp, (PN)(pn), 2) |
#define ASMI | ( | pn | ) | *asmp = potion_asm_put(P, *asmp, (PN)(pn), sizeof(int)) |
#define ASMN | ( | pn | ) | *asmp = potion_asm_put(P, *asmp, (PN)(pn), sizeof(PN)) |
#define ASMS | ( | cstr | ) | *asmp = potion_asm_write(P, *asmp, cstr, sizeof(cstr)-1) |