#include "X86RecognizableInstr.h"
#include "X86DisassemblerShared.h"
#include "X86DisassemblerTables.h"
#include "X86ModRMFilters.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/TableGen/Record.h"
#include <string>
usingnamespacellvm;
usingnamespaceX86Disassembler;
std::string X86Disassembler::getMnemonic(const CodeGenInstruction *I,
unsigned Variant) { … }
bool X86Disassembler::isRegisterOperand(const Record *Rec) { … }
bool X86Disassembler::isMemoryOperand(const Record *Rec) { … }
bool X86Disassembler::isImmediateOperand(const Record *Rec) { … }
unsigned X86Disassembler::getRegOperandSize(const Record *RegRec) { … }
unsigned X86Disassembler::getMemOperandSize(const Record *MemRec) { … }
static uint8_t byteFromBitsInit(BitsInit &init) { … }
static uint8_t byteFromRec(const Record *rec, StringRef name) { … }
RecognizableInstrBase::RecognizableInstrBase(const CodeGenInstruction &insn) { … }
bool RecognizableInstrBase::shouldBeEmitted() const { … }
RecognizableInstr::RecognizableInstr(DisassemblerTables &tables,
const CodeGenInstruction &insn,
InstrUID uid)
: … { … }
void RecognizableInstr::processInstr(DisassemblerTables &tables,
const CodeGenInstruction &insn,
InstrUID uid) { … }
#define EVEX_KB(n) …
#define EVEX_NF(n) …
#define EVEX_B_NF(n) …
#define EVEX_KB_ADSIZE(n) …
#define EVEX_KB_U(n) …
InstructionContext RecognizableInstr::insnContext() const { … }
void RecognizableInstr::adjustOperandEncoding(OperandEncoding &encoding) { … }
void RecognizableInstr::handleOperand(
bool optional, unsigned &operandIndex, unsigned &physicalOperandIndex,
unsigned numPhysicalOperands, const unsigned *operandMapping,
OperandEncoding (*encodingFromString)(const std::string &,
uint8_t OpSize)) { … }
void RecognizableInstr::emitInstructionSpecifier() { … }
void RecognizableInstr::emitDecodePath(DisassemblerTables &tables) const { … }
#define TYPE …
OperandType RecognizableInstr::typeFromString(const std::string &s,
bool hasREX_W, uint8_t OpSize) { … }
#undef TYPE
#define ENCODING …
OperandEncoding
RecognizableInstr::immediateEncodingFromString(const std::string &s,
uint8_t OpSize) { … }
OperandEncoding
RecognizableInstr::rmRegisterEncodingFromString(const std::string &s,
uint8_t OpSize) { … }
OperandEncoding
RecognizableInstr::roRegisterEncodingFromString(const std::string &s,
uint8_t OpSize) { … }
OperandEncoding
RecognizableInstr::vvvvRegisterEncodingFromString(const std::string &s,
uint8_t OpSize) { … }
OperandEncoding
RecognizableInstr::writemaskRegisterEncodingFromString(const std::string &s,
uint8_t OpSize) { … }
OperandEncoding
RecognizableInstr::memoryEncodingFromString(const std::string &s,
uint8_t OpSize) { … }
OperandEncoding
RecognizableInstr::relocationEncodingFromString(const std::string &s,
uint8_t OpSize) { … }
OperandEncoding
RecognizableInstr::opcodeModifierEncodingFromString(const std::string &s,
uint8_t OpSize) { … }
#undef ENCODING