LLVM
8.0.1
|
Go to the source code of this file.
Classes | |
struct | llvm::X86Disassembler::InstructionSpecifier |
The specification for how to extract and interpret a full instruction and its operands. More... | |
struct | llvm::X86Disassembler::InternalInstruction |
The x86 internal instruction, which is produced by the decoder. More... | |
Namespaces | |
llvm | |
This class represents lattice values for constants. | |
llvm::X86Disassembler | |
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 | REGS_BOUND |
#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(* | llvm::X86Disassembler::byteReader_t) (const void *arg, uint8_t *byte, uint64_t address) |
Type for the byte reader that the consumer must provide to the decoder. More... | |
typedef void(* | llvm::X86Disassembler::dlog_t) (void *arg, const char *log) |
Type for the logging function that the consumer can provide to get debugging output from the decoder. More... | |
Functions | |
int | llvm::X86Disassembler::decodeInstruction (InternalInstruction *insn, byteReader_t reader, const void *readerArg, dlog_t logger, void *loggerArg, const void *miiArg, uint64_t startLoc, DisassemblerMode mode) |
Decode one instruction and store the decoding results in a buffer provided by the consumer. More... | |
void | llvm::X86Disassembler::Debug (const char *file, unsigned line, const char *s) |
Print a message to debugs() More... | |
StringRef | llvm::X86Disassembler::GetInstrName (unsigned Opcode, const void *mii) |
#define aaaFromEVEX4of4 | ( | evex | ) | ((evex) & 0x7) |
Definition at line 50 of file X86DisassemblerDecoder.h.
Referenced by getID(), and readMaskRegister().
#define ALL_EA_BASES |
Definition at line 378 of file X86DisassemblerDecoder.h.
Referenced by translateRMMemory(), and translateRMRegister().
#define ALL_REGS |
Definition at line 387 of file X86DisassemblerDecoder.h.
Referenced by translateRegister(), translateRMMemory(), and translateRMRegister().
#define ALL_SIB_BASES |
Definition at line 383 of file X86DisassemblerDecoder.h.
Referenced by translateRMMemory().
#define baseFromSIB | ( | sib | ) | ((sib) & 0x7) |
Definition at line 31 of file X86DisassemblerDecoder.h.
Referenced by readSIB().
#define bFromEVEX2of4 | ( | evex | ) | (((~(evex)) & 0x20) >> 5) |
Definition at line 39 of file X86DisassemblerDecoder.h.
Referenced by readPrefixes().
#define bFromEVEX4of4 | ( | evex | ) | (((evex) & 0x10) >> 4) |
Definition at line 48 of file X86DisassemblerDecoder.h.
Referenced by getID().
#define bFromREX | ( | rex | ) | ((rex) & 0x1) |
Definition at line 35 of file X86DisassemblerDecoder.h.
Referenced by readModRM(), readOpcodeRegister(), and readSIB().
#define bFromVEX2of3 | ( | vex | ) | (((~(vex)) & 0x20) >> 5) |
Definition at line 54 of file X86DisassemblerDecoder.h.
Referenced by readPrefixes().
#define bFromXOP2of3 | ( | xop | ) | (((~(xop)) & 0x20) >> 5) |
Definition at line 68 of file X86DisassemblerDecoder.h.
Referenced by readPrefixes().
#define EA_BASES_16BIT |
Definition at line 98 of file X86DisassemblerDecoder.h.
#define EA_BASES_32BIT |
Definition at line 134 of file X86DisassemblerDecoder.h.
Referenced by translateRMMemory().
#define EA_BASES_64BIT |
Definition at line 170 of file X86DisassemblerDecoder.h.
Referenced by translateRMMemory().
#define ENTRY | ( | x | ) | EA_BASE_##x, |
Definition at line 452 of file X86DisassemblerDecoder.h.
#define ENTRY | ( | x | ) | EA_REG_##x, |
Definition at line 452 of file X86DisassemblerDecoder.h.
#define ENTRY | ( | x | ) | SIB_INDEX_##x, |
Definition at line 452 of file X86DisassemblerDecoder.h.
#define ENTRY | ( | x | ) | SIB_BASE_##x, |
Definition at line 452 of file X86DisassemblerDecoder.h.
#define ENTRY | ( | x | ) | MODRM_REG_##x, |
Definition at line 452 of file X86DisassemblerDecoder.h.
#define indexFromSIB | ( | sib | ) | (((sib) & 0x38) >> 3) |
Definition at line 30 of file X86DisassemblerDecoder.h.
Referenced by readSIB().
#define l2FromEVEX4of4 | ( | evex | ) | (((evex) & 0x40) >> 6) |
Definition at line 46 of file X86DisassemblerDecoder.h.
Referenced by getID(), and readOperands().
#define lFromEVEX4of4 | ( | evex | ) | (((evex) & 0x20) >> 5) |
Definition at line 47 of file X86DisassemblerDecoder.h.
Referenced by getID(), and readOperands().
#define lFromVEX2of2 | ( | vex | ) | (((vex) & 0x4) >> 2) |
Definition at line 63 of file X86DisassemblerDecoder.h.
Referenced by getID().
#define lFromVEX3of3 | ( | vex | ) | (((vex) & 0x4) >> 2) |
Definition at line 58 of file X86DisassemblerDecoder.h.
Referenced by getID().
#define lFromXOP3of3 | ( | xop | ) | (((xop) & 0x4) >> 2) |
Definition at line 72 of file X86DisassemblerDecoder.h.
Referenced by getID().
#define mmFromEVEX2of4 | ( | evex | ) | ((evex) & 0x3) |
Definition at line 41 of file X86DisassemblerDecoder.h.
Referenced by readOpcode().
#define mmmmmFromVEX2of3 | ( | vex | ) | ((vex) & 0x1f) |
Definition at line 55 of file X86DisassemblerDecoder.h.
Referenced by readOpcode().
#define mmmmmFromXOP2of3 | ( | xop | ) | ((xop) & 0x1f) |
Definition at line 69 of file X86DisassemblerDecoder.h.
Referenced by readOpcode().
#define modFromModRM | ( | modRM | ) | (((modRM) & 0xc0) >> 6) |
Definition at line 26 of file X86DisassemblerDecoder.h.
Referenced by decode(), readModRM(), and readSIB().
#define ppFromEVEX3of4 | ( | evex | ) | ((evex) & 0x3) |
Definition at line 44 of file X86DisassemblerDecoder.h.
Referenced by getID().
#define ppFromVEX2of2 | ( | vex | ) | ((vex) & 0x3) |
Definition at line 64 of file X86DisassemblerDecoder.h.
Referenced by getID(), and readPrefixes().
#define ppFromVEX3of3 | ( | vex | ) | ((vex) & 0x3) |
Definition at line 59 of file X86DisassemblerDecoder.h.
Referenced by getID().
#define ppFromXOP3of3 | ( | xop | ) | ((xop) & 0x3) |
Definition at line 73 of file X86DisassemblerDecoder.h.
Referenced by getID(), and readPrefixes().
#define r2FromEVEX2of4 | ( | evex | ) | (((~(evex)) & 0x10) >> 4) |
Definition at line 40 of file X86DisassemblerDecoder.h.
Referenced by readModRM().
#define regFromModRM | ( | modRM | ) | (((modRM) & 0x38) >> 3) |
Definition at line 27 of file X86DisassemblerDecoder.h.
Referenced by readModRM().
#define REGS_16BIT |
Definition at line 116 of file X86DisassemblerDecoder.h.
#define REGS_32BIT |
Definition at line 152 of file X86DisassemblerDecoder.h.
#define REGS_64BIT |
Definition at line 188 of file X86DisassemblerDecoder.h.
#define REGS_8BIT |
Definition at line 76 of file X86DisassemblerDecoder.h.
#define REGS_BOUND |
Definition at line 372 of file X86DisassemblerDecoder.h.
#define REGS_CONTROL |
Definition at line 354 of file X86DisassemblerDecoder.h.
#define REGS_DEBUG |
Definition at line 336 of file X86DisassemblerDecoder.h.
#define REGS_MASKS |
Definition at line 318 of file X86DisassemblerDecoder.h.
#define REGS_MMX |
Definition at line 206 of file X86DisassemblerDecoder.h.
#define REGS_SEGMENT |
Definition at line 328 of file X86DisassemblerDecoder.h.
#define REGS_XMM |
Definition at line 216 of file X86DisassemblerDecoder.h.
Referenced by translateRMMemory().
#define REGS_YMM |
Definition at line 250 of file X86DisassemblerDecoder.h.
Referenced by translateRMMemory().
#define REGS_ZMM |
Definition at line 284 of file X86DisassemblerDecoder.h.
Referenced by translateRMMemory().
#define rFromEVEX2of4 | ( | evex | ) | (((~(evex)) & 0x80) >> 7) |
Definition at line 37 of file X86DisassemblerDecoder.h.
Referenced by readPrefixes().
#define rFromREX | ( | rex | ) | (((rex) & 0x4) >> 2) |
Definition at line 33 of file X86DisassemblerDecoder.h.
Referenced by readModRM().
#define rFromVEX2of2 | ( | vex | ) | (((~(vex)) & 0x80) >> 7) |
Definition at line 61 of file X86DisassemblerDecoder.h.
Referenced by readPrefixes().
#define rFromVEX2of3 | ( | vex | ) | (((~(vex)) & 0x80) >> 7) |
Definition at line 52 of file X86DisassemblerDecoder.h.
Referenced by readPrefixes().
#define rFromXOP2of3 | ( | xop | ) | (((~(xop)) & 0x80) >> 7) |
Definition at line 66 of file X86DisassemblerDecoder.h.
Referenced by readPrefixes().
#define rmFromModRM | ( | modRM | ) | ((modRM) & 0x7) |
Definition at line 28 of file X86DisassemblerDecoder.h.
Referenced by readModRM().
#define scaleFromSIB | ( | sib | ) | (((sib) & 0xc0) >> 6) |
Definition at line 29 of file X86DisassemblerDecoder.h.
Referenced by readSIB().
#define v2FromEVEX4of4 | ( | evex | ) | (((~evex) & 0x8) >> 3) |
Definition at line 49 of file X86DisassemblerDecoder.h.
Referenced by readOperands(), and readVVVV().
#define vvvvFromEVEX3of4 | ( | evex | ) | (((~(evex)) & 0x78) >> 3) |
Definition at line 43 of file X86DisassemblerDecoder.h.
Referenced by readVVVV().
#define vvvvFromVEX2of2 | ( | vex | ) | (((~(vex)) & 0x78) >> 3) |
Definition at line 62 of file X86DisassemblerDecoder.h.
Referenced by readVVVV().
#define vvvvFromVEX3of3 | ( | vex | ) | (((~(vex)) & 0x78) >> 3) |
Definition at line 57 of file X86DisassemblerDecoder.h.
Referenced by readVVVV().
#define vvvvFromXOP3of3 | ( | vex | ) | (((~(vex)) & 0x78) >> 3) |
Definition at line 71 of file X86DisassemblerDecoder.h.
Referenced by readVVVV().
#define wFromEVEX3of4 | ( | evex | ) | (((evex) & 0x80) >> 7) |
Definition at line 42 of file X86DisassemblerDecoder.h.
Referenced by getID(), and readPrefixes().
#define wFromREX | ( | rex | ) | (((rex) & 0x8) >> 3) |
Definition at line 32 of file X86DisassemblerDecoder.h.
Referenced by readPrefixes().
#define wFromVEX3of3 | ( | vex | ) | (((vex) & 0x80) >> 7) |
Definition at line 56 of file X86DisassemblerDecoder.h.
Referenced by getID(), and readPrefixes().
#define wFromXOP3of3 | ( | xop | ) | (((xop) & 0x80) >> 7) |
Definition at line 70 of file X86DisassemblerDecoder.h.
Referenced by getID(), and readPrefixes().
#define xFromEVEX2of4 | ( | evex | ) | (((~(evex)) & 0x40) >> 6) |
Definition at line 38 of file X86DisassemblerDecoder.h.
Referenced by readModRM(), and readPrefixes().
#define xFromREX | ( | rex | ) | (((rex) & 0x2) >> 1) |
Definition at line 34 of file X86DisassemblerDecoder.h.
Referenced by readSIB().
#define xFromVEX2of3 | ( | vex | ) | (((~(vex)) & 0x40) >> 6) |
Definition at line 53 of file X86DisassemblerDecoder.h.
Referenced by readPrefixes().
#define xFromXOP2of3 | ( | xop | ) | (((~(xop)) & 0x40) >> 6) |
Definition at line 67 of file X86DisassemblerDecoder.h.
Referenced by readPrefixes().
#define zFromEVEX4of4 | ( | evex | ) | (((evex) & 0x80) >> 7) |
Definition at line 45 of file X86DisassemblerDecoder.h.
Referenced by getID().