Rename some subtarget features. A CPU now can *have* 64-bit instructions,
authorChris Lattner <sabre@nondot.org>
Fri, 16 Jun 2006 17:34:12 +0000 (17:34 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 16 Jun 2006 17:34:12 +0000 (17:34 +0000)
can in 32-bit mode we can choose to optionally *use* 64-bit registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28824 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPC.td
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCSubtarget.cpp
lib/Target/PowerPC/PPCSubtarget.h

index bc4f3e74e83a802eb0fbf77a920476e849fe71fe..6d23657512bd35e94f01fc5da924a1ee87613775 100644 (file)
@@ -19,10 +19,10 @@ include "../Target.td"
 // PowerPC Subtarget features.
 //
  
-def Feature64Bit     : SubtargetFeature<"64bit","Is64Bit", "true",
+def Feature64Bit     : SubtargetFeature<"64bit","Has64BitSupport", "true",
                                         "Enable 64-bit instructions">;
-def Feature64BitRegs : SubtargetFeature<"64bitregs","Has64BitRegs", "true",
-                                        "Enable 64-bit registers [beta]">;
+def Feature64BitRegs : SubtargetFeature<"64bitregs","Use64BitRegs", "true",
+                              "Enable 64-bit registers usage for ppc32 [beta]">;
 def FeatureAltivec   : SubtargetFeature<"altivec","HasAltivec", "true",
                                         "Enable Altivec instructions">;
 def FeatureGPUL      : SubtargetFeature<"gpul","IsGigaProcessor", "true",
index a0142b165b474be883969a990b166938cad13c29..ff42fa0212e13f2a5de0ed1e15a028b8c8793f53 100644 (file)
@@ -146,7 +146,7 @@ PPCTargetLowering::PPCTargetLowering(TargetMachine &TM)
   // We want to custom lower some of our intrinsics.
   setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::Other, Custom);
   
-  if (TM.getSubtarget<PPCSubtarget>().is64Bit()) {
+  if (TM.getSubtarget<PPCSubtarget>().has64BitSupport()) {
     // They also have instructions for converting between i64 and fp.
     setOperationAction(ISD::FP_TO_SINT, MVT::i64, Custom);
     setOperationAction(ISD::SINT_TO_FP, MVT::i64, Custom);
@@ -163,7 +163,7 @@ PPCTargetLowering::PPCTargetLowering(TargetMachine &TM)
     setOperationAction(ISD::FP_TO_UINT, MVT::i32, Expand);
   }
 
-  if (TM.getSubtarget<PPCSubtarget>().has64BitRegs()) {
+  if (TM.getSubtarget<PPCSubtarget>().use64BitRegs()) {
     // 64 bit PowerPC implementations can support i64 types directly
     addRegisterClass(MVT::i64, PPC::G8RCRegisterClass);
     // BUILD_PAIR can't be handled natively, and should be expanded to shl/or
@@ -2227,7 +2227,7 @@ SDOperand PPCTargetLowering::PerformDAGCombine(SDNode *N,
   switch (N->getOpcode()) {
   default: break;
   case ISD::SINT_TO_FP:
-    if (TM.getSubtarget<PPCSubtarget>().is64Bit()) {
+    if (TM.getSubtarget<PPCSubtarget>().has64BitSupport()) {
       if (N->getOperand(0).getOpcode() == ISD::FP_TO_SINT) {
         // Turn (sint_to_fp (fp_to_sint X)) -> fctidz/fcfid without load/stores.
         // We allow the src/dst to be either f32/f64, but the intermediate
index 607771b2ca46d4c11dd1de9215ff9cf452ad8ec5..b228ba7a9cad9713b39fafe4bc4983d112016085 100644 (file)
@@ -73,8 +73,8 @@ PPCSubtarget::PPCSubtarget(const Module &M, const std::string &FS, bool is64Bit)
   : StackAlignment(16)
   , InstrItins()
   , IsGigaProcessor(false)
-  , Is64Bit(false)
-  , Has64BitRegs(false)
+  , Has64BitSupport(false)
+  , Use64BitRegs(false)
   , HasAltivec(false)
   , HasFSQRT(false)
   , HasSTFIWX(false)
index c98291e16207fb58de83a8a96cd9127af88d8333..e898a048c6cf189bbb6fcba47337f1b5b6a7443c 100644 (file)
@@ -33,8 +33,8 @@ protected:
 
   /// Used by the ISel to turn in optimizations for POWER4-derived architectures
   bool IsGigaProcessor;
-  bool Is64Bit;
-  bool Has64BitRegs;
+  bool Has64BitSupport;
+  bool Use64BitRegs;
   bool HasAltivec;
   bool HasFSQRT;
   bool HasSTFIWX;
@@ -66,12 +66,12 @@ public:
 
   bool hasFSQRT() const { return HasFSQRT; }
   bool hasSTFIWX() const { return HasSTFIWX; }
-  bool has64BitRegs() const { return Has64BitRegs; }
+  bool use64BitRegs() const { return Use64BitRegs; }
   bool hasAltivec() const { return HasAltivec; }
   
   bool isAIX() const { return IsAIX; }
   bool isDarwin() const { return IsDarwin; }
-  bool is64Bit() const { return Is64Bit; }
+  bool has64BitSupport() const { return Has64BitSupport; }
   bool isGigaProcessor() const { return IsGigaProcessor; }
 };
 } // End llvm namespace