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; } 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: 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: 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