forked from OSchip/llvm-project
[Driver][Mips] Support one more MIPS CPU name - octeon.
llvm-svn: 212339
This commit is contained in:
parent
26610c5960
commit
4e16a4250d
|
@ -5320,6 +5320,7 @@ public:
|
|||
.Case("mips64", true)
|
||||
.Case("mips64r2", true)
|
||||
.Case("mips64r6", true)
|
||||
.Case("octeon", true)
|
||||
.Default(false);
|
||||
}
|
||||
const std::string& getCPU() const { return CPU; }
|
||||
|
@ -5332,7 +5333,10 @@ public:
|
|||
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,
|
||||
|
|
|
@ -1633,7 +1633,8 @@ static bool isMips64r2(const ArgList &Args) {
|
|||
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) {
|
||||
|
|
|
@ -116,6 +116,12 @@
|
|||
// 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
|
||||
|
|
|
@ -52,6 +52,11 @@
|
|||
// 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
|
||||
|
|
Loading…
Reference in New Issue