]> granicus.if.org Git - clang/commitdiff
Add e500mc and e5500 to the list of valid PPC CPU names.
authorHal Finkel <hfinkel@anl.gov>
Tue, 18 Sep 2012 22:25:03 +0000 (22:25 +0000)
committerHal Finkel <hfinkel@anl.gov>
Tue, 18 Sep 2012 22:25:03 +0000 (22:25 +0000)
Patch by Tobias von Koch!

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

lib/Basic/Targets.cpp
lib/Driver/Tools.cpp
test/Driver/clang-translation.c

index a02ad6d38d82d5a887ba4b143551d1777673cee3..3720d47e55cfef7dbd5c1528d49b1850b11e3db2 100644 (file)
@@ -641,6 +641,8 @@ public:
       .Case("970", true)
       .Case("g5", true)
       .Case("a2", true)
+      .Case("e500mc", true)
+      .Case("e5500", true)
       .Case("pwr6", true)
       .Case("pwr7", true)
       .Case("ppc", true)
index 63182f8c28da453d82a685cccba3d3530290bd13..960ffde228f3bb5a13048a5b3fe00923b4f8f784 100644 (file)
@@ -968,6 +968,8 @@ static std::string getPPCTargetCPU(const ArgList &Args) {
       .Case("970", "970")
       .Case("G5", "g5")
       .Case("a2", "a2")
+      .Case("e500mc", "e500mc")
+      .Case("e5500", "e5500")
       .Case("power6", "pwr6")
       .Case("power7", "pwr7")
       .Case("powerpc", "ppc")
index 76196da9fc3d6eaf34895e5eec458349a0368c7b..6f300398142453260e448391ea6a44fe4e042a0d 100644 (file)
 // PPC64NS: clang
 // PPC64NS: "-cc1"
 // PPC64NS: "-target-cpu" "ppc64"
+
+// RUN: %clang -ccc-clang-archs powerpc \
+// RUN:   -target powerpc-fsl-linux -### -S %s 2> %t.log \
+// RUN:   -mcpu=e500mc
+// RUN: FileCheck -check-prefix=PPCE500MC %s < %t.log
+// PPCE500MC: clang
+// PPCE500MC: "-cc1"
+// PPCE500MC: "-target-cpu" "e500mc"
+
+// RUN: %clang -ccc-clang-archs powerpc64 \
+// RUN:   -target powerpc64-fsl-linux -### -S %s 2> %t.log \
+// RUN:   -mcpu=e5500
+// RUN: FileCheck -check-prefix=PPCE5500 %s < %t.log
+// PPCE5500: clang
+// PPCE5500: "-cc1"
+// PPCE5500: "-target-cpu" "e5500"
+