Revert earlier unnecessary hack. Make sure we correctly force on 64bit and cmov...
[oota-llvm.git] / lib / MC / MCSubtargetInfo.cpp
index c401b7e1de0070c5e331145f1d17d3b682f938b6..3bb20b07f31d1a13bcdb7a2c6cc701026637d190 100644 (file)
 
 using namespace llvm;
 
+void MCSubtargetInfo::InitMCSubtargetInfo(StringRef CPU, StringRef FS,
+                                          const SubtargetFeatureKV *PF,
+                                          const SubtargetFeatureKV *PD,
+                                          const SubtargetInfoKV *PI,
+                                          const InstrStage *IS,
+                                          const unsigned *OC,
+                                          const unsigned *FP,
+                                          unsigned NF, unsigned NP) {
+  ProcFeatures = PF;
+  ProcDesc = PD;
+  ProcItins = PI;
+  Stages = IS;
+  OperandCycles = OC;
+  ForwardingPathes = FP;
+  NumFeatures = NF;
+  NumProcs = NP;
+
+  SubtargetFeatures Features(FS);
+  FeatureBits = Features.getFeatureBits(CPU, ProcDesc, NumProcs,
+                                        ProcFeatures, NumFeatures);
+}
+
+
+/// ReInitMCSubtargetInfo - Change CPU (and optionally supplemented with
+/// feature string) and recompute feature bits.
+uint64_t MCSubtargetInfo::ReInitMCSubtargetInfo(StringRef CPU, StringRef FS) {
+  SubtargetFeatures Features(FS);
+  FeatureBits = Features.getFeatureBits(CPU, ProcDesc, NumProcs,
+                                        ProcFeatures, NumFeatures);
+  return FeatureBits;
+}
+
 InstrItineraryData
 MCSubtargetInfo::getInstrItineraryForCPU(StringRef CPU) const {
   assert(ProcItins && "Instruction itineraries information not available!");