]> granicus.if.org Git - clang/commitdiff
[mips][p5600] Add -mcpu=p5600 option.
authorDaniel Sanders <daniel.sanders@imgtec.com>
Mon, 5 Oct 2015 12:24:30 +0000 (12:24 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Mon, 5 Oct 2015 12:24:30 +0000 (12:24 +0000)
Summary:

Reviewers: vkalintiris, atanasyan

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D12234

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

lib/Basic/Targets.cpp
lib/Driver/ToolChains.cpp
test/Driver/mips-abi.c
test/Driver/mips-as.c

index 3458a804f04f1f2f37da434795ea51560fb7ba71..87ecc57b0d7f49074a88481ab8c12381b0bf8a13 100644 (file)
@@ -6312,6 +6312,7 @@ public:
         .Case("mips64r5", true)
         .Case("mips64r6", true)
         .Case("octeon", true)
+        .Case("p5600", true)
         .Default(false);
   }
   const std::string& getCPU() const { return CPU; }
index 26e7ca659a2b9cb15dd1f7696461a75d92e86718..07c086a2691b35341e7dfc6ebf4b92e45428b90e 100644 (file)
@@ -1809,7 +1809,7 @@ static bool findMIPSMultilibs(const llvm::Triple &TargetTriple, StringRef Path,
   addMultilibFlag(isMips16(Args), "mips16", Flags);
   addMultilibFlag(CPUName == "mips32", "march=mips32", Flags);
   addMultilibFlag(CPUName == "mips32r2" || CPUName == "mips32r3" ||
-                      CPUName == "mips32r5",
+                      CPUName == "mips32r5" || CPUName == "p5600",
                   "march=mips32r2", Flags);
   addMultilibFlag(CPUName == "mips32r6", "march=mips32r6", Flags);
   addMultilibFlag(CPUName == "mips64", "march=mips64", Flags);
index f75632446e2770acb6597934cd1148ac10841d10..cede6850a023d27116885688fd60aaaa2b97a1e3 100644 (file)
 // MIPS-ARCH-32R2: "-target-abi" "o32"
 //
 // RUN: %clang -target mips-linux-gnu -### -c %s \
+// RUN:        -march=p5600 2>&1 \
+// RUN:   | FileCheck -check-prefix=MIPS-ARCH-P5600 %s
+// MIPS-ARCH-P5600: "-target-cpu" "p5600"
+// MIPS-ARCH-P5600: "-target-abi" "o32"
+//
+// RUN: %clang -target mips-linux-gnu -### -c %s \
 // RUN:        -march=mips64 2>&1 \
 // RUN:   | FileCheck -check-prefix=MIPS-ARCH-3264 %s
 // MIPS-ARCH-3264: "-target-cpu" "mips64"
index 0da1a9e11c058178ceea3d1a293d2a53d09125c9..63fc64c3f74abee4e69cf9cb98bb8ae032ff5fa0 100644 (file)
 // RUN:   | FileCheck -check-prefix=MIPS-32R2 %s
 // MIPS-32R2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
 //
+// RUN: %clang -target mips-linux-gnu -march=p5600 -### \
+// RUN:   -no-integrated-as -c %s 2>&1 \
+// RUN:   | FileCheck -check-prefix=MIPS-P5600 %s
+// MIPS-P5600: as{{(.exe)?}}" "-march" "p5600" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
+//
 // RUN: %clang -target mips64-linux-gnu -march=octeon -### \
 // RUN:   -no-integrated-as -c %s 2>&1 \
 // RUN:   | FileCheck -check-prefix=MIPS-OCTEON %s