Fixes for PPC host detection and features.
authorHal Finkel <hfinkel@anl.gov>
Tue, 12 Jun 2012 16:39:23 +0000 (16:39 +0000)
committerHal Finkel <hfinkel@anl.gov>
Tue, 12 Jun 2012 16:39:23 +0000 (16:39 +0000)
POWER4 is a 64-bit CPU (better matched to the 970).
The g3 is really the 750 (no altivec), the g4+ is the 74xx (not the 750).

Patch by Andreas Tobler.

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

lib/Support/Host.cpp
lib/Target/PowerPC/PPC.td

index d48c5265a4d92795ddec5439877fbcc9c6863f6a..677da5cd9fb3b749be62f64e0bd0e9f6865bc5e1 100644 (file)
@@ -440,7 +440,7 @@ std::string sys::getHostCPUName() {
     .Case("7447", "7400")
     .Case("7455", "7450")
     .Case("G4", "g4")
-    .Case("POWER4", "g4")
+    .Case("POWER4", "970")
     .Case("PPC970FX", "970")
     .Case("PPC970MP", "970")
     .Case("G5", "g5")
index 4ad5c54aa5298572341745b27f32743c64c5179d..96c46451be9b945859331451b1354f2d5ec256ab 100644 (file)
@@ -76,12 +76,12 @@ def : Processor<"603ev", G3Itineraries, [Directive603]>;
 def : Processor<"604", G3Itineraries, [Directive604]>;
 def : Processor<"604e", G3Itineraries, [Directive604]>;
 def : Processor<"620", G3Itineraries, [Directive620]>;
-def : Processor<"g3", G3Itineraries, [Directive7400]>;
+def : Processor<"750", G4Itineraries, [Directive750]>;
+def : Processor<"g3", G3Itineraries, [Directive750]>;
 def : Processor<"7400", G4Itineraries, [Directive7400, FeatureAltivec]>;
 def : Processor<"g4", G4Itineraries, [Directive7400, FeatureAltivec]>;
 def : Processor<"7450", G4PlusItineraries, [Directive7400, FeatureAltivec]>;
-def : Processor<"g4+", G4PlusItineraries, [Directive750, FeatureAltivec]>;
-def : Processor<"750", G4Itineraries, [Directive750, FeatureAltivec]>;
+def : Processor<"g4+", G4PlusItineraries, [Directive7400, FeatureAltivec]>;
 def : Processor<"970", G5Itineraries,
                   [Directive970, FeatureAltivec,
                    FeatureMFOCRF, FeatureFSqrt, FeatureSTFIWX,