aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/MBlaze
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-07-08 01:53:10 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-07-08 01:53:10 +0000
commitebdeeab812beec0385b445f3d4c41a114e0d972f (patch)
tree20eaafc6f227ca94201b0b6ac02d94b06b608229 /lib/Target/MBlaze
parent1fb0955cab05ff71f5bbad523b0374db3b08b201 (diff)
downloadexternal_llvm-ebdeeab812beec0385b445f3d4c41a114e0d972f.zip
external_llvm-ebdeeab812beec0385b445f3d4c41a114e0d972f.tar.gz
external_llvm-ebdeeab812beec0385b445f3d4c41a114e0d972f.tar.bz2
Eliminate asm parser's dependency on TargetMachine:
- Each target asm parser now creates its own MCSubtatgetInfo (if needed). - Changed AssemblerPredicate to take subtarget features which tablegen uses to generate asm matcher subtarget feature queries. e.g. "ModeThumb,FeatureThumb2" is translated to "(Bits & ModeThumb) != 0 && (Bits & FeatureThumb2) != 0". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134678 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/MBlaze')
-rw-r--r--lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp6
-rw-r--r--lib/Target/MBlaze/MBlazeSubtarget.cpp4
-rw-r--r--lib/Target/MBlaze/MBlazeTargetMachine.cpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp b/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp
index 524f33d..603fc64 100644
--- a/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp
+++ b/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp
@@ -32,7 +32,6 @@ struct MBlazeOperand;
class MBlazeAsmParser : public TargetAsmParser {
MCAsmParser &Parser;
- TargetMachine &TM;
MCAsmParser &getParser() const { return Parser; }
MCAsmLexer &getLexer() const { return Parser.getLexer(); }
@@ -64,8 +63,9 @@ class MBlazeAsmParser : public TargetAsmParser {
public:
- MBlazeAsmParser(const Target &T, MCAsmParser &_Parser, TargetMachine &_TM)
- : TargetAsmParser(T), Parser(_Parser), TM(_TM) {}
+ MBlazeAsmParser(const Target &T, StringRef TT, StringRef CPU, StringRef FS,
+ MCAsmParser &_Parser)
+ : TargetAsmParser(T), Parser(_Parser) {}
virtual bool ParseInstruction(StringRef Name, SMLoc NameLoc,
SmallVectorImpl<MCParsedAsmOperand*> &Operands);
diff --git a/lib/Target/MBlaze/MBlazeSubtarget.cpp b/lib/Target/MBlaze/MBlazeSubtarget.cpp
index 8e706cd..eb5e28f 100644
--- a/lib/Target/MBlaze/MBlazeSubtarget.cpp
+++ b/lib/Target/MBlaze/MBlazeSubtarget.cpp
@@ -16,9 +16,10 @@
#include "MBlazeRegisterInfo.h"
#include "llvm/Support/CommandLine.h"
-#define GET_SUBTARGETINFO_CTOR
+#define GET_SUBTARGETINFO_ENUM
#define GET_SUBTARGETINFO_MC_DESC
#define GET_SUBTARGETINFO_TARGET_DESC
+#define GET_SUBTARGETINFO_CTOR
#include "MBlazeGenSubtargetInfo.inc"
using namespace llvm;
@@ -61,4 +62,3 @@ enablePostRAScheduler(CodeGenOpt::Level OptLevel,
CriticalPathRCs.push_back(&MBlaze::GPRRegClass);
return HasItin && OptLevel >= CodeGenOpt::Default;
}
-
diff --git a/lib/Target/MBlaze/MBlazeTargetMachine.cpp b/lib/Target/MBlaze/MBlazeTargetMachine.cpp
index 1cbd2d4..c18cb8b 100644
--- a/lib/Target/MBlaze/MBlazeTargetMachine.cpp
+++ b/lib/Target/MBlaze/MBlazeTargetMachine.cpp
@@ -81,7 +81,7 @@ extern "C" void LLVMInitializeMBlazeTarget() {
MBlazeTargetMachine::
MBlazeTargetMachine(const Target &T, const std::string &TT,
const std::string &CPU, const std::string &FS):
- LLVMTargetMachine(T, TT),
+ LLVMTargetMachine(T, TT, CPU, FS),
Subtarget(TT, CPU, FS),
DataLayout("E-p:32:32:32-i8:8:8-i16:16:16"),
InstrInfo(*this),