Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Macros | |
#define | attsyntax 0 |
#define | EMIT_NAME emit_x86 |
#define | RZ_ARCH "x86" |
#define | RZ_SZ 4 |
#define | RZ_SP "esp" |
#define | RZ_BP "ebp" |
#define | RZ_AX "eax" |
#define | SYSCALL_ATT "int $0x80" |
#define | SYSCALL_INTEL "int 0x80" |
#define | RZ_REG_AR_OFF 0 |
#define | RZ_NGP (sizeof(regs) / sizeof(char *)) |
#define | BPOFF (RZ_SZ - 4) |
#define | M32(x) (unsigned int)((x)&0xffffffff) |
Functions | |
static void | emit_init (RzEgg *egg) |
static char * | emit_syscall (RzEgg *egg, int nargs) |
static void | emit_frame (RzEgg *egg, int sz) |
static void | emit_frame_end (RzEgg *egg, int sz, int ctx) |
static void | emit_comment (RzEgg *egg, const char *fmt,...) |
static void | emit_equ (RzEgg *egg, const char *key, const char *value) |
static const char * | getreg (int i) |
static void | emit_syscall_args (RzEgg *egg, int nargs) |
static void | emit_string (RzEgg *egg, const char *dstvar, const char *str, int j) |
static void | emit_call (RzEgg *egg, const char *str, int atr) |
static void | emit_jmp (RzEgg *egg, const char *str, int atr) |
static void | emit_arg (RzEgg *egg, int xs, int num, const char *str) |
static void | emit_get_result (RzEgg *egg, const char *ocn) |
static void | emit_restore_stack (RzEgg *egg, int size) |
static void | emit_get_while_end (RzEgg *egg, char *str, const char *ctxpush, const char *label) |
static void | emit_while_end (RzEgg *egg, const char *labelback) |
static void | emit_get_var (RzEgg *egg, int type, char *out, int idx) |
static void | emit_trap (RzEgg *egg) |
static void | emit_load_ptr (RzEgg *egg, const char *dst) |
static void | emit_branch (RzEgg *egg, char *b, char *g, char *e, char *n, int sz, const char *dst) |
static void | emit_load (RzEgg *egg, const char *dst, int sz) |
static void | emit_mathop (RzEgg *egg, int ch, int vs, int type, const char *eq, const char *p) |
static const char * | emit_regs (RzEgg *egg, int idx) |
static void | emit_get_ar (RzEgg *egg, char *out, int idx) |
Variables | |
static char * | regs [] = { "eax", "ebx", "ecx", "edx", "esi", "edi", "ebp" } |
RzEggEmit | EMIT_NAME |
#define attsyntax 0 |
Definition at line 10 of file emit_x86.c.
#define BPOFF (RZ_SZ - 4) |
#define EMIT_NAME emit_x86 |
Definition at line 24 of file emit_x86.c.
#define RZ_ARCH "x86" |
Definition at line 25 of file emit_x86.c.
#define RZ_AX "eax" |
Definition at line 29 of file emit_x86.c.
#define RZ_BP "ebp" |
Definition at line 28 of file emit_x86.c.
#define RZ_NGP (sizeof(regs) / sizeof(char *)) |
Definition at line 36 of file emit_x86.c.
#define RZ_REG_AR_OFF 0 |
Definition at line 32 of file emit_x86.c.
#define RZ_SP "esp" |
Definition at line 27 of file emit_x86.c.
#define RZ_SZ 4 |
Definition at line 26 of file emit_x86.c.
#define SYSCALL_ATT "int $0x80" |
Definition at line 30 of file emit_x86.c.
#define SYSCALL_INTEL "int 0x80" |
Definition at line 31 of file emit_x86.c.
Definition at line 265 of file emit_x86.c.
References attsyntax, d, RZ_AX, RZ_BP, rz_egg_printf(), and cmd_descs_generate::str.
|
static |
Definition at line 411 of file emit_x86.c.
References attsyntax, b, dst, e, free(), g, n, NULL, p, RZ_AX, rz_egg_mkvar(), rz_egg_printf(), and cmd_descs_generate::str.
Definition at line 237 of file emit_x86.c.
References attsyntax, rz_egg_printf(), and cmd_descs_generate::str.
Definition at line 125 of file emit_x86.c.
References key, rz_egg_printf(), and value.
Definition at line 97 of file emit_x86.c.
References attsyntax, RZ_BP, rz_egg_printf(), and RZ_SP.
Definition at line 543 of file emit_x86.c.
References emit_regs(), setup::idx, out, reg, and RZ_REG_AR_OFF.
Definition at line 352 of file emit_x86.c.
References eprintf, setup::idx, out, RZ_BP, RZ_SP, sprintf, and type.
|
static |
Definition at line 333 of file emit_x86.c.
References sprintf, and cmd_descs_generate::str.
|
static |
Definition at line 249 of file emit_x86.c.
References attsyntax, eprintf, rz_egg_printf(), and cmd_descs_generate::str.
Definition at line 391 of file emit_x86.c.
References attsyntax, d, dst, p, RZ_AX, RZ_BP, and rz_egg_printf().
|
static |
Definition at line 498 of file emit_x86.c.
References attsyntax, eprintf, eq, op, p, RZ_AX, rz_egg_printf(), and type.
Definition at line 539 of file emit_x86.c.
References setup::idx, regs, and RZ_NGP.
Referenced by emit_get_ar().
Definition at line 159 of file emit_x86.c.
References attsyntax, BPOFF, calloc(), free(), i, len, M32, memcpy(), memset(), n, p, RZ_AX, rz_egg_mkvar(), rz_egg_printf(), s, and cmd_descs_generate::str.
Definition at line 47 of file emit_x86.c.
References attsyntax, NULL, rz_egg_t::os, p, RZ_AX, RZ_EGG_OS_DARWIN, RZ_EGG_OS_LINUX, RZ_EGG_OS_MACOS, RZ_EGG_OS_OSX, snprintf, strdup(), SYSCALL_ATT, and SYSCALL_INTEL.
Definition at line 136 of file emit_x86.c.
References attsyntax, eprintf, getreg(), k, cmd_descs_generate::nargs, reg, rz_egg_printf(), RZ_SP, and RZ_SZ.
|
static |
Definition at line 387 of file emit_x86.c.
References rz_egg_printf().
RzEggEmit EMIT_NAME |
Definition at line 551 of file emit_x86.c.
Definition at line 33 of file emit_x86.c.
Referenced by emit_regs(), and getreg().