ARM: r12 is callee-saved for interrupt handlers
[oota-llvm.git] / lib / Target / Sparc / SparcSubtarget.cpp
index 7032d7f3fb0919bcaee377b7b2441d30cb89bb67..6fc9d5638488130ffed68b716c69fcfcf8a161a3 100644 (file)
@@ -31,7 +31,8 @@ SparcSubtarget::SparcSubtarget(const std::string &TT, const std::string &CPU,
   V8DeprecatedInsts(false),
   IsVIS(false),
   Is64Bit(is64Bit),
-  HasHardQuad(false) {
+  HasHardQuad(false),
+  UsePopc(false) {
 
   // Determine default and user specified characteristics
   std::string CPUName = CPU;
@@ -40,6 +41,10 @@ SparcSubtarget::SparcSubtarget(const std::string &TT, const std::string &CPU,
 
   // Parse features string.
   ParseSubtargetFeatures(CPUName, FS);
+
+  // Popc is a v9-only instruction.
+  if (!IsV9)
+    UsePopc = false;
 }