Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | reader_info |
struct | InstructionSpecifier |
struct | InternalInstruction |
Macros | |
#define | modFromModRM(modRM) (((modRM) & 0xc0) >> 6) |
#define | regFromModRM(modRM) (((modRM) & 0x38) >> 3) |
#define | rmFromModRM(modRM) ((modRM) & 0x7) |
#define | scaleFromSIB(sib) (((sib) & 0xc0) >> 6) |
#define | indexFromSIB(sib) (((sib) & 0x38) >> 3) |
#define | baseFromSIB(sib) ((sib) & 0x7) |
#define | wFromREX(rex) (((rex) & 0x8) >> 3) |
#define | rFromREX(rex) (((rex) & 0x4) >> 2) |
#define | xFromREX(rex) (((rex) & 0x2) >> 1) |
#define | bFromREX(rex) ((rex) & 0x1) |
#define | rFromEVEX2of4(evex) (((~(evex)) & 0x80) >> 7) |
#define | xFromEVEX2of4(evex) (((~(evex)) & 0x40) >> 6) |
#define | bFromEVEX2of4(evex) (((~(evex)) & 0x20) >> 5) |
#define | r2FromEVEX2of4(evex) (((~(evex)) & 0x10) >> 4) |
#define | mmFromEVEX2of4(evex) ((evex) & 0x3) |
#define | wFromEVEX3of4(evex) (((evex) & 0x80) >> 7) |
#define | vvvvFromEVEX3of4(evex) (((~(evex)) & 0x78) >> 3) |
#define | ppFromEVEX3of4(evex) ((evex) & 0x3) |
#define | zFromEVEX4of4(evex) (((evex) & 0x80) >> 7) |
#define | l2FromEVEX4of4(evex) (((evex) & 0x40) >> 6) |
#define | lFromEVEX4of4(evex) (((evex) & 0x20) >> 5) |
#define | bFromEVEX4of4(evex) (((evex) & 0x10) >> 4) |
#define | v2FromEVEX4of4(evex) (((~evex) & 0x8) >> 3) |
#define | aaaFromEVEX4of4(evex) ((evex) & 0x7) |
#define | rFromVEX2of3(vex) (((~(vex)) & 0x80) >> 7) |
#define | xFromVEX2of3(vex) (((~(vex)) & 0x40) >> 6) |
#define | bFromVEX2of3(vex) (((~(vex)) & 0x20) >> 5) |
#define | mmmmmFromVEX2of3(vex) ((vex) & 0x1f) |
#define | wFromVEX3of3(vex) (((vex) & 0x80) >> 7) |
#define | vvvvFromVEX3of3(vex) (((~(vex)) & 0x78) >> 3) |
#define | lFromVEX3of3(vex) (((vex) & 0x4) >> 2) |
#define | ppFromVEX3of3(vex) ((vex) & 0x3) |
#define | rFromVEX2of2(vex) (((~(vex)) & 0x80) >> 7) |
#define | vvvvFromVEX2of2(vex) (((~(vex)) & 0x78) >> 3) |
#define | lFromVEX2of2(vex) (((vex) & 0x4) >> 2) |
#define | ppFromVEX2of2(vex) ((vex) & 0x3) |
#define | rFromXOP2of3(xop) (((~(xop)) & 0x80) >> 7) |
#define | xFromXOP2of3(xop) (((~(xop)) & 0x40) >> 6) |
#define | bFromXOP2of3(xop) (((~(xop)) & 0x20) >> 5) |
#define | mmmmmFromXOP2of3(xop) ((xop) & 0x1f) |
#define | wFromXOP3of3(xop) (((xop) & 0x80) >> 7) |
#define | vvvvFromXOP3of3(vex) (((~(vex)) & 0x78) >> 3) |
#define | lFromXOP3of3(xop) (((xop) & 0x4) >> 2) |
#define | ppFromXOP3of3(xop) ((xop) & 0x3) |
#define | REGS_8BIT |
#define | EA_BASES_16BIT |
#define | REGS_16BIT |
#define | EA_BASES_32BIT |
#define | REGS_32BIT |
#define | EA_BASES_64BIT |
#define | REGS_64BIT |
#define | REGS_MMX |
#define | REGS_XMM |
#define | REGS_YMM |
#define | REGS_ZMM |
#define | REGS_MASKS |
#define | REGS_SEGMENT |
#define | REGS_DEBUG |
#define | REGS_CONTROL |
#define | ALL_EA_BASES |
#define | ALL_SIB_BASES |
#define | ALL_REGS |
#define | ENTRY(x) EA_BASE_##x, |
#define | ENTRY(x) EA_REG_##x, |
#define | ENTRY(x) SIB_INDEX_##x, |
#define | ENTRY(x) SIB_BASE_##x, |
#define | ENTRY(x) MODRM_REG_##x, |
Typedefs | |
typedef int(* | byteReader_t) (const struct reader_info *arg, uint8_t *byte, uint64_t address) |
typedef void(* | dlog_t) (void *arg, const char *log) |
typedef struct InternalInstruction | InternalInstruction |
Enumerations | |
enum | EABase { EA_BASE_NONE , EA_max } |
enum | SIBIndex { SIB_INDEX_NONE , SIB_INDEX_max } |
enum | SIBBase { SIB_BASE_NONE , SIB_BASE_max } |
enum | EADisplacement { EA_DISP_NONE , EA_DISP_8 , EA_DISP_16 , EA_DISP_32 } |
enum | Reg { MODRM_REG_max } |
enum | SegmentOverride { SEG_OVERRIDE_NONE , SEG_OVERRIDE_CS , SEG_OVERRIDE_SS , SEG_OVERRIDE_DS , SEG_OVERRIDE_ES , SEG_OVERRIDE_FS , SEG_OVERRIDE_GS , SEG_OVERRIDE_max } |
enum | VEXLeadingOpcodeByte { VEX_LOB_0F = 0x1 , VEX_LOB_0F38 = 0x2 , VEX_LOB_0F3A = 0x3 } |
enum | XOPMapSelect { XOP_MAP_SELECT_8 = 0x8 , XOP_MAP_SELECT_9 = 0x9 , XOP_MAP_SELECT_A = 0xA } |
enum | VEXPrefixCode { VEX_PREFIX_NONE = 0x0 , VEX_PREFIX_66 = 0x1 , VEX_PREFIX_F3 = 0x2 , VEX_PREFIX_F2 = 0x3 } |
enum | VectorExtensionType { TYPE_NO_VEX_XOP = 0x0 , TYPE_VEX_2B = 0x1 , TYPE_VEX_3B = 0x2 , TYPE_EVEX = 0x3 , TYPE_XOP = 0x4 } |
Functions | |
int | decodeInstruction (struct InternalInstruction *insn, byteReader_t reader, const void *readerArg, uint64_t startLoc, DisassemblerMode mode) |
#define aaaFromEVEX4of4 | ( | evex | ) | ((evex) & 0x7) |
Definition at line 57 of file X86DisassemblerDecoder.h.
#define ALL_EA_BASES |
Definition at line 383 of file X86DisassemblerDecoder.h.
#define ALL_REGS |
Definition at line 392 of file X86DisassemblerDecoder.h.
#define ALL_SIB_BASES |
Definition at line 388 of file X86DisassemblerDecoder.h.
#define baseFromSIB | ( | sib | ) | ((sib) & 0x7) |
Definition at line 38 of file X86DisassemblerDecoder.h.
#define bFromEVEX2of4 | ( | evex | ) | (((~(evex)) & 0x20) >> 5) |
Definition at line 46 of file X86DisassemblerDecoder.h.
#define bFromEVEX4of4 | ( | evex | ) | (((evex) & 0x10) >> 4) |
Definition at line 55 of file X86DisassemblerDecoder.h.
#define bFromREX | ( | rex | ) | ((rex) & 0x1) |
Definition at line 42 of file X86DisassemblerDecoder.h.
#define bFromVEX2of3 | ( | vex | ) | (((~(vex)) & 0x20) >> 5) |
Definition at line 61 of file X86DisassemblerDecoder.h.
#define bFromXOP2of3 | ( | xop | ) | (((~(xop)) & 0x20) >> 5) |
Definition at line 75 of file X86DisassemblerDecoder.h.
#define EA_BASES_16BIT |
Definition at line 108 of file X86DisassemblerDecoder.h.
#define EA_BASES_32BIT |
Definition at line 144 of file X86DisassemblerDecoder.h.
#define EA_BASES_64BIT |
Definition at line 180 of file X86DisassemblerDecoder.h.
Definition at line 467 of file X86DisassemblerDecoder.h.
Definition at line 467 of file X86DisassemblerDecoder.h.
Definition at line 467 of file X86DisassemblerDecoder.h.
Definition at line 467 of file X86DisassemblerDecoder.h.
Definition at line 467 of file X86DisassemblerDecoder.h.
#define indexFromSIB | ( | sib | ) | (((sib) & 0x38) >> 3) |
Definition at line 37 of file X86DisassemblerDecoder.h.
#define l2FromEVEX4of4 | ( | evex | ) | (((evex) & 0x40) >> 6) |
Definition at line 53 of file X86DisassemblerDecoder.h.
#define lFromEVEX4of4 | ( | evex | ) | (((evex) & 0x20) >> 5) |
Definition at line 54 of file X86DisassemblerDecoder.h.
#define lFromVEX2of2 | ( | vex | ) | (((vex) & 0x4) >> 2) |
Definition at line 70 of file X86DisassemblerDecoder.h.
#define lFromVEX3of3 | ( | vex | ) | (((vex) & 0x4) >> 2) |
Definition at line 65 of file X86DisassemblerDecoder.h.
#define lFromXOP3of3 | ( | xop | ) | (((xop) & 0x4) >> 2) |
Definition at line 79 of file X86DisassemblerDecoder.h.
#define mmFromEVEX2of4 | ( | evex | ) | ((evex) & 0x3) |
Definition at line 48 of file X86DisassemblerDecoder.h.
#define mmmmmFromVEX2of3 | ( | vex | ) | ((vex) & 0x1f) |
Definition at line 62 of file X86DisassemblerDecoder.h.
#define mmmmmFromXOP2of3 | ( | xop | ) | ((xop) & 0x1f) |
Definition at line 76 of file X86DisassemblerDecoder.h.
#define modFromModRM | ( | modRM | ) | (((modRM) & 0xc0) >> 6) |
Definition at line 33 of file X86DisassemblerDecoder.h.
#define ppFromEVEX3of4 | ( | evex | ) | ((evex) & 0x3) |
Definition at line 51 of file X86DisassemblerDecoder.h.
#define ppFromVEX2of2 | ( | vex | ) | ((vex) & 0x3) |
Definition at line 71 of file X86DisassemblerDecoder.h.
#define ppFromVEX3of3 | ( | vex | ) | ((vex) & 0x3) |
Definition at line 66 of file X86DisassemblerDecoder.h.
#define ppFromXOP3of3 | ( | xop | ) | ((xop) & 0x3) |
Definition at line 80 of file X86DisassemblerDecoder.h.
#define r2FromEVEX2of4 | ( | evex | ) | (((~(evex)) & 0x10) >> 4) |
Definition at line 47 of file X86DisassemblerDecoder.h.
#define regFromModRM | ( | modRM | ) | (((modRM) & 0x38) >> 3) |
Definition at line 34 of file X86DisassemblerDecoder.h.
#define REGS_16BIT |
Definition at line 126 of file X86DisassemblerDecoder.h.
#define REGS_32BIT |
Definition at line 162 of file X86DisassemblerDecoder.h.
#define REGS_64BIT |
Definition at line 198 of file X86DisassemblerDecoder.h.
#define REGS_8BIT |
Definition at line 86 of file X86DisassemblerDecoder.h.
#define REGS_CONTROL |
Definition at line 365 of file X86DisassemblerDecoder.h.
#define REGS_DEBUG |
Definition at line 347 of file X86DisassemblerDecoder.h.
#define REGS_MASKS |
Definition at line 329 of file X86DisassemblerDecoder.h.
#define REGS_MMX |
Definition at line 216 of file X86DisassemblerDecoder.h.
#define REGS_SEGMENT |
Definition at line 339 of file X86DisassemblerDecoder.h.
#define REGS_XMM |
Definition at line 226 of file X86DisassemblerDecoder.h.
#define REGS_YMM |
Definition at line 261 of file X86DisassemblerDecoder.h.
#define REGS_ZMM |
Definition at line 295 of file X86DisassemblerDecoder.h.
#define rFromEVEX2of4 | ( | evex | ) | (((~(evex)) & 0x80) >> 7) |
Definition at line 44 of file X86DisassemblerDecoder.h.
#define rFromREX | ( | rex | ) | (((rex) & 0x4) >> 2) |
Definition at line 40 of file X86DisassemblerDecoder.h.
#define rFromVEX2of2 | ( | vex | ) | (((~(vex)) & 0x80) >> 7) |
Definition at line 68 of file X86DisassemblerDecoder.h.
#define rFromVEX2of3 | ( | vex | ) | (((~(vex)) & 0x80) >> 7) |
Definition at line 59 of file X86DisassemblerDecoder.h.
#define rFromXOP2of3 | ( | xop | ) | (((~(xop)) & 0x80) >> 7) |
Definition at line 73 of file X86DisassemblerDecoder.h.
#define rmFromModRM | ( | modRM | ) | ((modRM) & 0x7) |
Definition at line 35 of file X86DisassemblerDecoder.h.
#define scaleFromSIB | ( | sib | ) | (((sib) & 0xc0) >> 6) |
Definition at line 36 of file X86DisassemblerDecoder.h.
#define v2FromEVEX4of4 | ( | evex | ) | (((~evex) & 0x8) >> 3) |
Definition at line 56 of file X86DisassemblerDecoder.h.
#define vvvvFromEVEX3of4 | ( | evex | ) | (((~(evex)) & 0x78) >> 3) |
Definition at line 50 of file X86DisassemblerDecoder.h.
#define vvvvFromVEX2of2 | ( | vex | ) | (((~(vex)) & 0x78) >> 3) |
Definition at line 69 of file X86DisassemblerDecoder.h.
#define vvvvFromVEX3of3 | ( | vex | ) | (((~(vex)) & 0x78) >> 3) |
Definition at line 64 of file X86DisassemblerDecoder.h.
#define vvvvFromXOP3of3 | ( | vex | ) | (((~(vex)) & 0x78) >> 3) |
Definition at line 78 of file X86DisassemblerDecoder.h.
#define wFromEVEX3of4 | ( | evex | ) | (((evex) & 0x80) >> 7) |
Definition at line 49 of file X86DisassemblerDecoder.h.
#define wFromREX | ( | rex | ) | (((rex) & 0x8) >> 3) |
Definition at line 39 of file X86DisassemblerDecoder.h.
#define wFromVEX3of3 | ( | vex | ) | (((vex) & 0x80) >> 7) |
Definition at line 63 of file X86DisassemblerDecoder.h.
#define wFromXOP3of3 | ( | xop | ) | (((xop) & 0x80) >> 7) |
Definition at line 77 of file X86DisassemblerDecoder.h.
#define xFromEVEX2of4 | ( | evex | ) | (((~(evex)) & 0x40) >> 6) |
Definition at line 45 of file X86DisassemblerDecoder.h.
#define xFromREX | ( | rex | ) | (((rex) & 0x2) >> 1) |
Definition at line 41 of file X86DisassemblerDecoder.h.
#define xFromVEX2of3 | ( | vex | ) | (((~(vex)) & 0x40) >> 6) |
Definition at line 60 of file X86DisassemblerDecoder.h.
#define xFromXOP2of3 | ( | xop | ) | (((~(xop)) & 0x40) >> 6) |
Definition at line 74 of file X86DisassemblerDecoder.h.
#define zFromEVEX4of4 | ( | evex | ) | (((evex) & 0x80) >> 7) |
Definition at line 52 of file X86DisassemblerDecoder.h.
Definition at line 537 of file X86DisassemblerDecoder.h.
Definition at line 547 of file X86DisassemblerDecoder.h.
typedef struct InternalInstruction InternalInstruction |
enum EABase |
enum EADisplacement |
Enumerator | |
---|---|
EA_DISP_NONE | |
EA_DISP_8 | |
EA_DISP_16 | |
EA_DISP_32 |
Definition at line 456 of file X86DisassemblerDecoder.h.
enum Reg |
enum SegmentOverride |
Enumerator | |
---|---|
SEG_OVERRIDE_NONE | |
SEG_OVERRIDE_CS | |
SEG_OVERRIDE_SS | |
SEG_OVERRIDE_DS | |
SEG_OVERRIDE_ES | |
SEG_OVERRIDE_FS | |
SEG_OVERRIDE_GS | |
SEG_OVERRIDE_max |
Definition at line 476 of file X86DisassemblerDecoder.h.
enum SIBBase |
enum SIBIndex |
enum VectorExtensionType |
Enumerator | |
---|---|
TYPE_NO_VEX_XOP | |
TYPE_VEX_2B | |
TYPE_VEX_3B | |
TYPE_EVEX | |
TYPE_XOP |
Definition at line 512 of file X86DisassemblerDecoder.h.
enum VEXLeadingOpcodeByte |
Enumerator | |
---|---|
VEX_LOB_0F | |
VEX_LOB_0F38 | |
VEX_LOB_0F3A |
Definition at line 490 of file X86DisassemblerDecoder.h.
enum VEXPrefixCode |
Enumerator | |
---|---|
VEX_PREFIX_NONE | |
VEX_PREFIX_66 | |
VEX_PREFIX_F3 | |
VEX_PREFIX_F2 |
Definition at line 505 of file X86DisassemblerDecoder.h.
enum XOPMapSelect |
Enumerator | |
---|---|
XOP_MAP_SELECT_8 | |
XOP_MAP_SELECT_9 | |
XOP_MAP_SELECT_A |
Definition at line 496 of file X86DisassemblerDecoder.h.
int decodeInstruction | ( | struct InternalInstruction * | insn, |
byteReader_t | reader, | ||
const void * | readerArg, | ||
uint64_t | startLoc, | ||
DisassemblerMode | mode | ||
) |