1 //===-- X86Disassembler.cpp - Disassembler for x86 and x86_64 -------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file is part of the X86 Disassembler.
11 // It contains code to translate the data produced by the decoder into
13 // Documentation for the disassembler can be found in X86Disassembler.h.
15 //===----------------------------------------------------------------------===//
17 #include "X86Disassembler.h"
18 #include "X86DisassemblerDecoder.h"
19 #include "llvm/MC/MCContext.h"
20 #include "llvm/MC/MCDisassembler.h"
21 #include "llvm/MC/MCExpr.h"
22 #include "llvm/MC/MCInst.h"
23 #include "llvm/MC/MCInstrInfo.h"
24 #include "llvm/MC/MCSubtargetInfo.h"
25 #include "llvm/Support/Debug.h"
26 #include "llvm/Support/MemoryObject.h"
27 #include "llvm/Support/TargetRegistry.h"
28 #include "llvm/Support/raw_ostream.h"
31 using namespace llvm::X86Disassembler;
33 #define DEBUG_TYPE "x86-disassembler"
35 #define GET_REGINFO_ENUM
36 #include "X86GenRegisterInfo.inc"
37 #define GET_INSTRINFO_ENUM
38 #include "X86GenInstrInfo.inc"
39 #define GET_SUBTARGETINFO_ENUM
40 #include "X86GenSubtargetInfo.inc"
42 void llvm::X86Disassembler::Debug(const char *file, unsigned line,
44 dbgs() << file << ":" << line << ": " << s;
47 const char *llvm::X86Disassembler::GetInstrName(unsigned Opcode,
49 const MCInstrInfo *MII = static_cast<const MCInstrInfo *>(mii);
50 return MII->getName(Opcode);
53 #define debug(s) DEBUG(Debug(__FILE__, __LINE__, s));
57 // Fill-ins to make the compiler happy. These constants are never actually
58 // assigned; they are just filler to make an automatically-generated switch
71 extern Target TheX86_32Target, TheX86_64Target;
75 static bool translateInstruction(MCInst &target,
76 InternalInstruction &source,
77 const MCDisassembler *Dis);
79 X86GenericDisassembler::X86GenericDisassembler(
80 const MCSubtargetInfo &STI,
82 std::unique_ptr<const MCInstrInfo> MII)
83 : MCDisassembler(STI, Ctx), MII(std::move(MII)) {
84 switch (STI.getFeatureBits() &
85 (X86::Mode16Bit | X86::Mode32Bit | X86::Mode64Bit)) {
96 llvm_unreachable("Invalid CPU mode");
100 /// regionReader - a callback function that wraps the readByte method from
103 /// @param arg - The generic callback parameter. In this case, this should
104 /// be a pointer to a MemoryObject.
105 /// @param byte - A pointer to the byte to be read.
106 /// @param address - The address to be read.
107 static int regionReader(const void* arg, uint8_t* byte, uint64_t address) {
108 const MemoryObject* region = static_cast<const MemoryObject*>(arg);
109 return region->readByte(address, byte);
112 /// logger - a callback function that wraps the operator<< method from
115 /// @param arg - The generic callback parameter. This should be a pointe
116 /// to a raw_ostream.
117 /// @param log - A string to be logged. logger() adds a newline.
118 static void logger(void* arg, const char* log) {
122 raw_ostream &vStream = *(static_cast<raw_ostream*>(arg));
123 vStream << log << "\n";
127 // Public interface for the disassembler
130 MCDisassembler::DecodeStatus
131 X86GenericDisassembler::getInstruction(MCInst &instr,
133 const MemoryObject ®ion,
135 raw_ostream &vStream,
136 raw_ostream &cStream) const {
137 CommentStream = &cStream;
139 InternalInstruction internalInstr;
141 dlog_t loggerFn = logger;
142 if (&vStream == &nulls())
143 loggerFn = nullptr; // Disable logging completely if it's going to nulls().
145 int ret = decodeInstruction(&internalInstr,
147 (const void*)®ion,
150 (const void*)MII.get(),
155 size = internalInstr.readerCursor - address;
159 size = internalInstr.length;
160 return (!translateInstruction(instr, internalInstr, this)) ?
166 // Private code that translates from struct InternalInstructions to MCInsts.
169 /// translateRegister - Translates an internal register to the appropriate LLVM
170 /// register, and appends it as an operand to an MCInst.
172 /// @param mcInst - The MCInst to append to.
173 /// @param reg - The Reg to append.
174 static void translateRegister(MCInst &mcInst, Reg reg) {
175 #define ENTRY(x) X86::x,
176 uint8_t llvmRegnums[] = {
182 uint8_t llvmRegnum = llvmRegnums[reg];
183 mcInst.addOperand(MCOperand::CreateReg(llvmRegnum));
186 /// tryAddingSymbolicOperand - trys to add a symbolic operand in place of the
187 /// immediate Value in the MCInst.
189 /// @param Value - The immediate Value, has had any PC adjustment made by
191 /// @param isBranch - If the instruction is a branch instruction
192 /// @param Address - The starting address of the instruction
193 /// @param Offset - The byte offset to this immediate in the instruction
194 /// @param Width - The byte width of this immediate in the instruction
196 /// If the getOpInfo() function was set when setupForSymbolicDisassembly() was
197 /// called then that function is called to get any symbolic information for the
198 /// immediate in the instruction using the Address, Offset and Width. If that
199 /// returns non-zero then the symbolic information it returns is used to create
200 /// an MCExpr and that is added as an operand to the MCInst. If getOpInfo()
201 /// returns zero and isBranch is true then a symbol look up for immediate Value
202 /// is done and if a symbol is found an MCExpr is created with that, else
203 /// an MCExpr with the immediate Value is created. This function returns true
204 /// if it adds an operand to the MCInst and false otherwise.
205 static bool tryAddingSymbolicOperand(int64_t Value, bool isBranch,
206 uint64_t Address, uint64_t Offset,
207 uint64_t Width, MCInst &MI,
208 const MCDisassembler *Dis) {
209 return Dis->tryAddingSymbolicOperand(MI, Value, Address, isBranch,
213 /// tryAddingPcLoadReferenceComment - trys to add a comment as to what is being
214 /// referenced by a load instruction with the base register that is the rip.
215 /// These can often be addresses in a literal pool. The Address of the
216 /// instruction and its immediate Value are used to determine the address
217 /// being referenced in the literal pool entry. The SymbolLookUp call back will
218 /// return a pointer to a literal 'C' string if the referenced address is an
219 /// address into a section with 'C' string literals.
220 static void tryAddingPcLoadReferenceComment(uint64_t Address, uint64_t Value,
221 const void *Decoder) {
222 const MCDisassembler *Dis = static_cast<const MCDisassembler*>(Decoder);
223 Dis->tryAddingPcLoadReferenceComment(Value, Address);
226 static const uint8_t segmentRegnums[SEG_OVERRIDE_max] = {
227 0, // SEG_OVERRIDE_NONE
236 /// translateSrcIndex - Appends a source index operand to an MCInst.
238 /// @param mcInst - The MCInst to append to.
239 /// @param insn - The internal instruction.
240 static bool translateSrcIndex(MCInst &mcInst, InternalInstruction &insn) {
243 if (insn.mode == MODE_64BIT)
244 baseRegNo = insn.prefixPresent[0x67] ? X86::ESI : X86::RSI;
245 else if (insn.mode == MODE_32BIT)
246 baseRegNo = insn.prefixPresent[0x67] ? X86::SI : X86::ESI;
248 assert(insn.mode == MODE_16BIT);
249 baseRegNo = insn.prefixPresent[0x67] ? X86::ESI : X86::SI;
251 MCOperand baseReg = MCOperand::CreateReg(baseRegNo);
252 mcInst.addOperand(baseReg);
254 MCOperand segmentReg;
255 segmentReg = MCOperand::CreateReg(segmentRegnums[insn.segmentOverride]);
256 mcInst.addOperand(segmentReg);
260 /// translateDstIndex - Appends a destination index operand to an MCInst.
262 /// @param mcInst - The MCInst to append to.
263 /// @param insn - The internal instruction.
265 static bool translateDstIndex(MCInst &mcInst, InternalInstruction &insn) {
268 if (insn.mode == MODE_64BIT)
269 baseRegNo = insn.prefixPresent[0x67] ? X86::EDI : X86::RDI;
270 else if (insn.mode == MODE_32BIT)
271 baseRegNo = insn.prefixPresent[0x67] ? X86::DI : X86::EDI;
273 assert(insn.mode == MODE_16BIT);
274 baseRegNo = insn.prefixPresent[0x67] ? X86::EDI : X86::DI;
276 MCOperand baseReg = MCOperand::CreateReg(baseRegNo);
277 mcInst.addOperand(baseReg);
281 /// translateImmediate - Appends an immediate operand to an MCInst.
283 /// @param mcInst - The MCInst to append to.
284 /// @param immediate - The immediate value to append.
285 /// @param operand - The operand, as stored in the descriptor table.
286 /// @param insn - The internal instruction.
287 static void translateImmediate(MCInst &mcInst, uint64_t immediate,
288 const OperandSpecifier &operand,
289 InternalInstruction &insn,
290 const MCDisassembler *Dis) {
291 // Sign-extend the immediate if necessary.
293 OperandType type = (OperandType)operand.type;
295 bool isBranch = false;
297 if (type == TYPE_RELv) {
299 pcrel = insn.startLocation +
300 insn.immediateOffset + insn.immediateSize;
301 switch (insn.displacementSize) {
306 immediate |= ~(0xffull);
309 if(immediate & 0x8000)
310 immediate |= ~(0xffffull);
313 if(immediate & 0x80000000)
314 immediate |= ~(0xffffffffull);
320 // By default sign-extend all X86 immediates based on their encoding.
321 else if (type == TYPE_IMM8 || type == TYPE_IMM16 || type == TYPE_IMM32 ||
322 type == TYPE_IMM64 || type == TYPE_IMMv) {
323 uint32_t Opcode = mcInst.getOpcode();
324 switch (operand.encoding) {
328 // Special case those X86 instructions that use the imm8 as a set of
329 // bits, bit count, etc. and are not sign-extend.
330 if (Opcode != X86::BLENDPSrri && Opcode != X86::BLENDPDrri &&
331 Opcode != X86::PBLENDWrri && Opcode != X86::MPSADBWrri &&
332 Opcode != X86::DPPSrri && Opcode != X86::DPPDrri &&
333 Opcode != X86::INSERTPSrr && Opcode != X86::VBLENDPSYrri &&
334 Opcode != X86::VBLENDPSYrmi && Opcode != X86::VBLENDPDYrri &&
335 Opcode != X86::VBLENDPDYrmi && Opcode != X86::VPBLENDWrri &&
336 Opcode != X86::VMPSADBWrri && Opcode != X86::VDPPSYrri &&
337 Opcode != X86::VDPPSYrmi && Opcode != X86::VDPPDrri &&
338 Opcode != X86::VINSERTPSrr)
340 immediate |= ~(0xffull);
343 if(immediate & 0x8000)
344 immediate |= ~(0xffffull);
347 if(immediate & 0x80000000)
348 immediate |= ~(0xffffffffull);
359 mcInst.addOperand(MCOperand::CreateReg(X86::XMM0 + (immediate >> 4)));
362 mcInst.addOperand(MCOperand::CreateReg(X86::YMM0 + (immediate >> 4)));
365 mcInst.addOperand(MCOperand::CreateReg(X86::ZMM0 + (immediate >> 4)));
369 pcrel = insn.startLocation + insn.immediateOffset + insn.immediateSize;
371 immediate |= ~(0xffull);
376 pcrel = insn.startLocation + insn.immediateOffset + insn.immediateSize;
377 if(immediate & 0x80000000)
378 immediate |= ~(0xffffffffull);
381 // operand is 64 bits wide. Do nothing.
385 if(!tryAddingSymbolicOperand(immediate + pcrel, isBranch, insn.startLocation,
386 insn.immediateOffset, insn.immediateSize,
388 mcInst.addOperand(MCOperand::CreateImm(immediate));
390 if (type == TYPE_MOFFS8 || type == TYPE_MOFFS16 ||
391 type == TYPE_MOFFS32 || type == TYPE_MOFFS64) {
392 MCOperand segmentReg;
393 segmentReg = MCOperand::CreateReg(segmentRegnums[insn.segmentOverride]);
394 mcInst.addOperand(segmentReg);
398 /// translateRMRegister - Translates a register stored in the R/M field of the
399 /// ModR/M byte to its LLVM equivalent and appends it to an MCInst.
400 /// @param mcInst - The MCInst to append to.
401 /// @param insn - The internal instruction to extract the R/M field
403 /// @return - 0 on success; -1 otherwise
404 static bool translateRMRegister(MCInst &mcInst,
405 InternalInstruction &insn) {
406 if (insn.eaBase == EA_BASE_sib || insn.eaBase == EA_BASE_sib64) {
407 debug("A R/M register operand may not have a SIB byte");
411 switch (insn.eaBase) {
413 debug("Unexpected EA base register");
416 debug("EA_BASE_NONE for ModR/M base");
418 #define ENTRY(x) case EA_BASE_##x:
421 debug("A R/M register operand may not have a base; "
422 "the operand must be a register.");
426 mcInst.addOperand(MCOperand::CreateReg(X86::x)); break;
434 /// translateRMMemory - Translates a memory operand stored in the Mod and R/M
435 /// fields of an internal instruction (and possibly its SIB byte) to a memory
436 /// operand in LLVM's format, and appends it to an MCInst.
438 /// @param mcInst - The MCInst to append to.
439 /// @param insn - The instruction to extract Mod, R/M, and SIB fields
441 /// @return - 0 on success; nonzero otherwise
442 static bool translateRMMemory(MCInst &mcInst, InternalInstruction &insn,
443 const MCDisassembler *Dis) {
444 // Addresses in an MCInst are represented as five operands:
445 // 1. basereg (register) The R/M base, or (if there is a SIB) the
447 // 2. scaleamount (immediate) 1, or (if there is a SIB) the specified
449 // 3. indexreg (register) x86_registerNONE, or (if there is a SIB)
450 // the index (which is multiplied by the
452 // 4. displacement (immediate) 0, or the displacement if there is one
453 // 5. segmentreg (register) x86_registerNONE for now, but could be set
454 // if we have segment overrides
457 MCOperand scaleAmount;
459 MCOperand displacement;
460 MCOperand segmentReg;
463 if (insn.eaBase == EA_BASE_sib || insn.eaBase == EA_BASE_sib64) {
464 if (insn.sibBase != SIB_BASE_NONE) {
465 switch (insn.sibBase) {
467 debug("Unexpected sibBase");
471 baseReg = MCOperand::CreateReg(X86::x); break;
476 baseReg = MCOperand::CreateReg(0);
479 // Check whether we are handling VSIB addressing mode for GATHER.
480 // If sibIndex was set to SIB_INDEX_NONE, index offset is 4 and
481 // we should use SIB_INDEX_XMM4|YMM4 for VSIB.
482 // I don't see a way to get the correct IndexReg in readSIB:
483 // We can tell whether it is VSIB or SIB after instruction ID is decoded,
484 // but instruction ID may not be decoded yet when calling readSIB.
485 uint32_t Opcode = mcInst.getOpcode();
486 bool IndexIs128 = (Opcode == X86::VGATHERDPDrm ||
487 Opcode == X86::VGATHERDPDYrm ||
488 Opcode == X86::VGATHERQPDrm ||
489 Opcode == X86::VGATHERDPSrm ||
490 Opcode == X86::VGATHERQPSrm ||
491 Opcode == X86::VPGATHERDQrm ||
492 Opcode == X86::VPGATHERDQYrm ||
493 Opcode == X86::VPGATHERQQrm ||
494 Opcode == X86::VPGATHERDDrm ||
495 Opcode == X86::VPGATHERQDrm);
496 bool IndexIs256 = (Opcode == X86::VGATHERQPDYrm ||
497 Opcode == X86::VGATHERDPSYrm ||
498 Opcode == X86::VGATHERQPSYrm ||
499 Opcode == X86::VGATHERDPDZrm ||
500 Opcode == X86::VPGATHERDQZrm ||
501 Opcode == X86::VPGATHERQQYrm ||
502 Opcode == X86::VPGATHERDDYrm ||
503 Opcode == X86::VPGATHERQDYrm);
504 bool IndexIs512 = (Opcode == X86::VGATHERQPDZrm ||
505 Opcode == X86::VGATHERDPSZrm ||
506 Opcode == X86::VGATHERQPSZrm ||
507 Opcode == X86::VPGATHERQQZrm ||
508 Opcode == X86::VPGATHERDDZrm ||
509 Opcode == X86::VPGATHERQDZrm);
510 if (IndexIs128 || IndexIs256 || IndexIs512) {
511 unsigned IndexOffset = insn.sibIndex -
512 (insn.addressSize == 8 ? SIB_INDEX_RAX:SIB_INDEX_EAX);
513 SIBIndex IndexBase = IndexIs512 ? SIB_INDEX_ZMM0 :
514 IndexIs256 ? SIB_INDEX_YMM0 : SIB_INDEX_XMM0;
515 insn.sibIndex = (SIBIndex)(IndexBase +
516 (insn.sibIndex == SIB_INDEX_NONE ? 4 : IndexOffset));
519 if (insn.sibIndex != SIB_INDEX_NONE) {
520 switch (insn.sibIndex) {
522 debug("Unexpected sibIndex");
525 case SIB_INDEX_##x: \
526 indexReg = MCOperand::CreateReg(X86::x); break;
535 indexReg = MCOperand::CreateReg(0);
538 scaleAmount = MCOperand::CreateImm(insn.sibScale);
540 switch (insn.eaBase) {
542 if (insn.eaDisplacement == EA_DISP_NONE) {
543 debug("EA_BASE_NONE and EA_DISP_NONE for ModR/M base");
546 if (insn.mode == MODE_64BIT){
547 pcrel = insn.startLocation +
548 insn.displacementOffset + insn.displacementSize;
549 tryAddingPcLoadReferenceComment(insn.startLocation +
550 insn.displacementOffset,
551 insn.displacement + pcrel, Dis);
552 baseReg = MCOperand::CreateReg(X86::RIP); // Section 2.2.1.6
555 baseReg = MCOperand::CreateReg(0);
557 indexReg = MCOperand::CreateReg(0);
560 baseReg = MCOperand::CreateReg(X86::BX);
561 indexReg = MCOperand::CreateReg(X86::SI);
564 baseReg = MCOperand::CreateReg(X86::BX);
565 indexReg = MCOperand::CreateReg(X86::DI);
568 baseReg = MCOperand::CreateReg(X86::BP);
569 indexReg = MCOperand::CreateReg(X86::SI);
572 baseReg = MCOperand::CreateReg(X86::BP);
573 indexReg = MCOperand::CreateReg(X86::DI);
576 indexReg = MCOperand::CreateReg(0);
577 switch (insn.eaBase) {
579 debug("Unexpected eaBase");
581 // Here, we will use the fill-ins defined above. However,
582 // BX_SI, BX_DI, BP_SI, and BP_DI are all handled above and
583 // sib and sib64 were handled in the top-level if, so they're only
584 // placeholders to keep the compiler happy.
587 baseReg = MCOperand::CreateReg(X86::x); break;
590 #define ENTRY(x) case EA_REG_##x:
593 debug("A R/M memory operand may not be a register; "
594 "the base field must be a base.");
599 scaleAmount = MCOperand::CreateImm(1);
602 displacement = MCOperand::CreateImm(insn.displacement);
604 segmentReg = MCOperand::CreateReg(segmentRegnums[insn.segmentOverride]);
606 mcInst.addOperand(baseReg);
607 mcInst.addOperand(scaleAmount);
608 mcInst.addOperand(indexReg);
609 if(!tryAddingSymbolicOperand(insn.displacement + pcrel, false,
610 insn.startLocation, insn.displacementOffset,
611 insn.displacementSize, mcInst, Dis))
612 mcInst.addOperand(displacement);
613 mcInst.addOperand(segmentReg);
617 /// translateRM - Translates an operand stored in the R/M (and possibly SIB)
618 /// byte of an instruction to LLVM form, and appends it to an MCInst.
620 /// @param mcInst - The MCInst to append to.
621 /// @param operand - The operand, as stored in the descriptor table.
622 /// @param insn - The instruction to extract Mod, R/M, and SIB fields
624 /// @return - 0 on success; nonzero otherwise
625 static bool translateRM(MCInst &mcInst, const OperandSpecifier &operand,
626 InternalInstruction &insn, const MCDisassembler *Dis) {
627 switch (operand.type) {
629 debug("Unexpected type for a R/M operand");
649 case TYPE_CONTROLREG:
650 return translateRMRegister(mcInst, insn);
670 return translateRMMemory(mcInst, insn, Dis);
674 /// translateFPRegister - Translates a stack position on the FPU stack to its
675 /// LLVM form, and appends it to an MCInst.
677 /// @param mcInst - The MCInst to append to.
678 /// @param stackPos - The stack position to translate.
679 static void translateFPRegister(MCInst &mcInst,
681 mcInst.addOperand(MCOperand::CreateReg(X86::ST0 + stackPos));
684 /// translateMaskRegister - Translates a 3-bit mask register number to
685 /// LLVM form, and appends it to an MCInst.
687 /// @param mcInst - The MCInst to append to.
688 /// @param maskRegNum - Number of mask register from 0 to 7.
689 /// @return - false on success; true otherwise.
690 static bool translateMaskRegister(MCInst &mcInst,
691 uint8_t maskRegNum) {
692 if (maskRegNum >= 8) {
693 debug("Invalid mask register number");
697 mcInst.addOperand(MCOperand::CreateReg(X86::K0 + maskRegNum));
701 /// translateOperand - Translates an operand stored in an internal instruction
702 /// to LLVM's format and appends it to an MCInst.
704 /// @param mcInst - The MCInst to append to.
705 /// @param operand - The operand, as stored in the descriptor table.
706 /// @param insn - The internal instruction.
707 /// @return - false on success; true otherwise.
708 static bool translateOperand(MCInst &mcInst, const OperandSpecifier &operand,
709 InternalInstruction &insn,
710 const MCDisassembler *Dis) {
711 switch (operand.encoding) {
713 debug("Unhandled operand encoding during translation");
716 translateRegister(mcInst, insn.reg);
718 case ENCODING_WRITEMASK:
719 return translateMaskRegister(mcInst, insn.writemask);
721 return translateRM(mcInst, operand, insn, Dis);
728 debug("Translation of code offsets isn't supported.");
736 translateImmediate(mcInst,
737 insn.immediates[insn.numImmediatesTranslated++],
743 return translateSrcIndex(mcInst, insn);
745 return translateDstIndex(mcInst, insn);
751 translateRegister(mcInst, insn.opcodeRegister);
754 translateFPRegister(mcInst, insn.modRM & 7);
757 translateRegister(mcInst, insn.vvvv);
760 return translateOperand(mcInst, insn.operands[operand.type - TYPE_DUP0],
765 /// translateInstruction - Translates an internal instruction and all its
766 /// operands to an MCInst.
768 /// @param mcInst - The MCInst to populate with the instruction's data.
769 /// @param insn - The internal instruction.
770 /// @return - false on success; true otherwise.
771 static bool translateInstruction(MCInst &mcInst,
772 InternalInstruction &insn,
773 const MCDisassembler *Dis) {
775 debug("Instruction has no specification");
779 mcInst.setOpcode(insn.instructionID);
780 // If when reading the prefix bytes we determined the overlapping 0xf2 or 0xf3
781 // prefix bytes should be disassembled as xrelease and xacquire then set the
782 // opcode to those instead of the rep and repne opcodes.
783 if (insn.xAcquireRelease) {
784 if(mcInst.getOpcode() == X86::REP_PREFIX)
785 mcInst.setOpcode(X86::XRELEASE_PREFIX);
786 else if(mcInst.getOpcode() == X86::REPNE_PREFIX)
787 mcInst.setOpcode(X86::XACQUIRE_PREFIX);
790 insn.numImmediatesTranslated = 0;
792 for (const auto &Op : insn.operands) {
793 if (Op.encoding != ENCODING_NONE) {
794 if (translateOperand(mcInst, Op, insn, Dis)) {
803 static MCDisassembler *createX86Disassembler(const Target &T,
804 const MCSubtargetInfo &STI,
806 std::unique_ptr<const MCInstrInfo> MII(T.createMCInstrInfo());
807 return new X86Disassembler::X86GenericDisassembler(STI, Ctx, std::move(MII));
810 extern "C" void LLVMInitializeX86Disassembler() {
811 // Register the disassembler.
812 TargetRegistry::RegisterMCDisassembler(TheX86_32Target,
813 createX86Disassembler);
814 TargetRegistry::RegisterMCDisassembler(TheX86_64Target,
815 createX86Disassembler);