forked from OSchip/llvm-project
61 lines
2.4 KiB
Diff
61 lines
2.4 KiB
Diff
Index: lib/MC/MCDisassembler/Disassembler.cpp
|
|
===================================================================
|
|
--- lib/MC/MCDisassembler/Disassembler.cpp (revision 152265)
|
|
+++ lib/MC/MCDisassembler/Disassembler.cpp (working copy)
|
|
@@ -15,7 +15,9 @@
|
|
#include "llvm/MC/MCDisassembler.h"
|
|
#include "llvm/MC/MCInst.h"
|
|
#include "llvm/MC/MCInstPrinter.h"
|
|
+#include "llvm/MC/MCInstrInfo.h"
|
|
#include "llvm/MC/MCRegisterInfo.h"
|
|
+#include "llvm/MC/MCSubtargetInfo.h"
|
|
#include "llvm/Support/MemoryObject.h"
|
|
#include "llvm/Support/TargetRegistry.h"
|
|
#include "llvm/Support/TargetSelect.h"
|
|
@@ -86,7 +88,7 @@
|
|
LLVMDisasmContext *DC = new LLVMDisasmContext(TripleName, DisInfo, TagType,
|
|
GetOpInfo, SymbolLookUp,
|
|
TheTarget, MAI, MRI,
|
|
- Ctx, DisAsm, IP);
|
|
+ STI, Ctx, DisAsm, IP);
|
|
assert(DC && "Allocation failure!");
|
|
|
|
return DC;
|
|
Index: lib/MC/MCDisassembler/Disassembler.h
|
|
===================================================================
|
|
--- lib/MC/MCDisassembler/Disassembler.h (revision 152265)
|
|
+++ lib/MC/MCDisassembler/Disassembler.h (working copy)
|
|
@@ -29,6 +29,7 @@
|
|
class MCDisassembler;
|
|
class MCInstPrinter;
|
|
class MCRegisterInfo;
|
|
+class MCSubtargetInfo;
|
|
class Target;
|
|
|
|
//
|
|
@@ -61,6 +62,8 @@
|
|
llvm::OwningPtr<const llvm::MCAsmInfo> MAI;
|
|
// The register information for the target architecture.
|
|
llvm::OwningPtr<const llvm::MCRegisterInfo> MRI;
|
|
+ // The subtarget information for the target architecture.
|
|
+ llvm::OwningPtr<const llvm::MCSubtargetInfo> MSI;
|
|
// The assembly context for creating symbols and MCExprs.
|
|
llvm::OwningPtr<const llvm::MCContext> Ctx;
|
|
// The disassembler for the target architecture.
|
|
@@ -78,6 +81,7 @@
|
|
LLVMSymbolLookupCallback symbolLookUp,
|
|
const Target *theTarget, const MCAsmInfo *mAI,
|
|
const MCRegisterInfo *mRI,
|
|
+ const MCSubtargetInfo *mSI,
|
|
llvm::MCContext *ctx, const MCDisassembler *disAsm,
|
|
MCInstPrinter *iP) : TripleName(tripleName),
|
|
DisInfo(disInfo), TagType(tagType), GetOpInfo(getOpInfo),
|
|
@@ -85,6 +89,7 @@
|
|
CommentStream(CommentsToEmit) {
|
|
MAI.reset(mAI);
|
|
MRI.reset(mRI);
|
|
+ MSI.reset(mSI);
|
|
Ctx.reset(ctx);
|
|
DisAsm.reset(disAsm);
|
|
IP.reset(iP);
|