.Case("mips64", true)
.Case("mips64r2", true)
.Case("mips64r6", true)
+ .Case("octeon", true)
.Default(false);
}
const std::string& getCPU() const { return CPU; }
Features["n64"] = false;
Features[ABI] = true;
- Features[CPU] = true;
+ if (CPU == "octeon")
+ Features["mips64r2"] = Features["cnmips"] = true;
+ else
+ Features[CPU] = true;
}
void getTargetDefines(const LangOptions &Opts,
Arg *A = Args.getLastArg(options::OPT_march_EQ,
options::OPT_mcpu_EQ);
- return A && A->getValue() == StringRef("mips64r2");
+ return A && (A->getValue() == StringRef("mips64r2") ||
+ A->getValue() == StringRef("octeon"));
}
static bool isMicroMips(const ArgList &Args) {
// MIPS-ARCH-64R2: "-target-cpu" "mips64r2"
// MIPS-ARCH-64R2: "-target-abi" "n64"
//
+// RUN: %clang -target mips64-linux-gnu -### -c %s \
+// RUN: -march=octeon 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ARCH-OCTEON %s
+// MIPS-ARCH-OCTEON: "-target-cpu" "octeon"
+// MIPS-ARCH-OCTEON: "-target-abi" "n64"
+//
// RUN: not %clang -target mips64-linux-gnu -c %s \
// RUN: -march=mips32 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-ARCH-6432 %s
// RUN: | FileCheck -check-prefix=MIPS-32R2 %s
// MIPS-32R2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
//
+// RUN: %clang -target mips64-linux-gnu -march=octeon -### \
+// RUN: -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-OCTEON %s
+// MIPS-OCTEON: as{{(.exe)?}}" "-march" "octeon" "-mabi" "64" "-EB"
+//
// RUN: %clang -target mips-linux-gnu -mips1 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-1 %s