[PATCH] D12234: [mips][p5600] Add -mcpu=p5600 option.
Daniel Sanders via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 21 05:47:32 PDT 2015
dsanders created this revision.
dsanders added reviewers: vkalintiris, atanasyan.
dsanders added a subscriber: cfe-commits.
dsanders added a dependency: D12193: [mips][p5600] Added P5600 processor and initial scheduler..
Depends on D12193
http://reviews.llvm.org/D12234
Files:
lib/Basic/Targets.cpp
lib/Driver/ToolChains.cpp
test/Driver/mips-abi.c
test/Driver/mips-as.c
Index: test/Driver/mips-as.c
===================================================================
--- test/Driver/mips-as.c
+++ test/Driver/mips-as.c
@@ -58,6 +58,11 @@
// 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
Index: test/Driver/mips-abi.c
===================================================================
--- test/Driver/mips-abi.c
+++ test/Driver/mips-abi.c
@@ -99,6 +99,12 @@
// 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: lib/Driver/ToolChains.cpp
===================================================================
--- lib/Driver/ToolChains.cpp
+++ lib/Driver/ToolChains.cpp
@@ -1754,7 +1754,7 @@
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: lib/Basic/Targets.cpp
===================================================================
--- lib/Basic/Targets.cpp
+++ lib/Basic/Targets.cpp
@@ -6263,6 +6263,7 @@
.Case("mips64r5", true)
.Case("mips64r6", true)
.Case("octeon", true)
+ .Case("p5600", true)
.Default(false);
}
const std::string& getCPU() const { return CPU; }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12234.32817.patch
Type: text/x-patch
Size: 2404 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150821/b2ac14b8/attachment.bin>
More information about the cfe-commits
mailing list