dsanders created this revision. dsanders added a reviewer: atanasyan. dsanders added a subscriber: cfe-commits. dsanders added a dependency: D20961: [mips] Replace almost all Arch checks in MipsTargetInfo with ABI checks. NFC.. Herald added a subscriber: sdardis.
Depends on D20961 http://reviews.llvm.org/D20963 Files: lib/Basic/Targets.cpp test/Driver/mips-abi.c Index: test/Driver/mips-abi.c =================================================================== --- test/Driver/mips-abi.c +++ test/Driver/mips-abi.c @@ -98,6 +98,11 @@ // MIPS-ARCH-P5600: "-target-cpu" "p5600" // MIPS-ARCH-P5600: "-target-abi" "o32" // +// RUN: not %clang -target mips-linux-gnu -c %s \ +// RUN: -march=p5600 -mabi=64 2>&1 \ +// RUN: | FileCheck -check-prefix=MIPS-ARCH-P5600-N64 %s +// MIPS-ARCH-P5600-N64: error: unknown target ABI 'n64' +// // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -march=mips64 2>&1 \ // RUN: | FileCheck -check-prefix=MIPS-ARCH-3264 %s Index: lib/Basic/Targets.cpp =================================================================== --- lib/Basic/Targets.cpp +++ lib/Basic/Targets.cpp @@ -7170,7 +7170,7 @@ .Case("mips64r5", true) .Case("mips64r6", true) .Case("octeon", true) - .Case("p5600", true) + .Case("p5600", !GPR64Required) .Default(false); } const std::string& getCPU() const { return CPU; }
Index: test/Driver/mips-abi.c =================================================================== --- test/Driver/mips-abi.c +++ test/Driver/mips-abi.c @@ -98,6 +98,11 @@ // MIPS-ARCH-P5600: "-target-cpu" "p5600" // MIPS-ARCH-P5600: "-target-abi" "o32" // +// RUN: not %clang -target mips-linux-gnu -c %s \ +// RUN: -march=p5600 -mabi=64 2>&1 \ +// RUN: | FileCheck -check-prefix=MIPS-ARCH-P5600-N64 %s +// MIPS-ARCH-P5600-N64: error: unknown target ABI 'n64' +// // RUN: %clang -target mips-linux-gnu -### -c %s \ // RUN: -march=mips64 2>&1 \ // RUN: | FileCheck -check-prefix=MIPS-ARCH-3264 %s Index: lib/Basic/Targets.cpp =================================================================== --- lib/Basic/Targets.cpp +++ lib/Basic/Targets.cpp @@ -7170,7 +7170,7 @@ .Case("mips64r5", true) .Case("mips64r6", true) .Case("octeon", true) - .Case("p5600", true) + .Case("p5600", !GPR64Required) .Default(false); } const std::string& getCPU() const { return CPU; }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits