#include "Common/CodeGenInstruction.h"
#include "Common/CodeGenTarget.h"
#include "X86RecognizableInstr.h"
#include "llvm/TableGen/Error.h"
#include "llvm/TableGen/Record.h"
#include "llvm/TableGen/TableGenBackend.h"
#include <map>
#include <set>
usingnamespacellvm;
usingnamespaceX86Disassembler;
namespace {
class X86InstrMappingEmitter { … };
void X86InstrMappingEmitter::printClassDef(raw_ostream &OS) { … }
static void printMacroBegin(StringRef Macro, raw_ostream &OS) { … }
static void printMacroEnd(StringRef Macro, raw_ostream &OS) { … }
void X86InstrMappingEmitter::printTable(ArrayRef<Entry> Table, StringRef Name,
StringRef Macro, raw_ostream &OS) { … }
static uint8_t byteFromBitsInit(const BitsInit *B) { … }
class IsMatch { … };
static bool isInteresting(const Record *Rec) { … }
void X86InstrMappingEmitter::emitCompressEVEXTable(
ArrayRef<const CodeGenInstruction *> Insts, raw_ostream &OS) { … }
void X86InstrMappingEmitter::emitNFTransformTable(
ArrayRef<const CodeGenInstruction *> Insts, raw_ostream &OS) { … }
void X86InstrMappingEmitter::emitND2NonNDTable(
ArrayRef<const CodeGenInstruction *> Insts, raw_ostream &OS) { … }
void X86InstrMappingEmitter::emitSSE2AVXTable(
ArrayRef<const CodeGenInstruction *> Insts, raw_ostream &OS) { … }
void X86InstrMappingEmitter::run(raw_ostream &OS) { … }
}
static TableGen::Emitter::OptClass<X86InstrMappingEmitter>
X("gen-x86-instr-mapping", "Generate X86 instruction mapping");