forked from OSchip/llvm-project
[mips] Correct the invocation of GAS in several cases.
Summary: As a result of this patch, assembling an empty file with GCC and Clang (using GAS as the assembler) now produces identical objects. -mfp32/-mfpxx/-mfp64 now form a trinity of options. -mfpxx is the default when the triple vendor is 'img' or 'mti', the ABI is O32, and the CPU is between mips2 and mips32r2/mips64r2 (inclusive). -mno-shared is always given to the assembler to match the effect of -mabicalls (currently unimplemented but Clang acts as if it is given). Similarly, -call_nonpic is always given to match the effect of -mplt (also unimplemented and acts as if given) except when the ABI is 64 in which case -mplt has no effect so -KPIC is given instead. -mhard-float/-msoft-float are now passed on. -modd-spreg/-mno-odd-spreg are now passed on. -mno-mips16 is correctly passed on. The assembler option is -no-mips16 not -mno-mips16 Differential Revision: http://reviews.llvm.org/D4515 llvm-svn: 213138
This commit is contained in:
parent
a03624d8ab
commit
379d44bfdf
clang
|
@ -1023,8 +1023,14 @@ static void AddTargetFeature(const ArgList &Args,
|
|||
}
|
||||
}
|
||||
|
||||
static void getMIPSTargetFeatures(const Driver &D, const ArgList &Args,
|
||||
static void getMIPSTargetFeatures(const Driver &D, const llvm::Triple &Triple,
|
||||
const ArgList &Args,
|
||||
std::vector<const char *> &Features) {
|
||||
StringRef CPUName;
|
||||
StringRef ABIName;
|
||||
getMipsCPUAndABI(Args, Triple, CPUName, ABIName);
|
||||
ABIName = getGnuCompatibleMipsABIName(ABIName);
|
||||
|
||||
StringRef FloatABI = getMipsFloatABI(D, Args);
|
||||
if (FloatABI == "soft") {
|
||||
// FIXME: Note, this is a hack. We need to pass the selected float
|
||||
|
@ -1056,12 +1062,23 @@ static void getMIPSTargetFeatures(const Driver &D, const ArgList &Args,
|
|||
"dspr2");
|
||||
AddTargetFeature(Args, Features, options::OPT_mmsa, options::OPT_mno_msa,
|
||||
"msa");
|
||||
AddTargetFeature(Args, Features, options::OPT_mfp64, options::OPT_mfp32,
|
||||
"fp64");
|
||||
if (Args.getLastArg(options::OPT_mfpxx)) {
|
||||
|
||||
// Add the last -mfp32/-mfpxx/-mfp64 or if none are given and the ABI is O32
|
||||
// pass -mfpxx
|
||||
if (Arg *A = Args.getLastArg(options::OPT_mfp32, options::OPT_mfpxx,
|
||||
options::OPT_mfp64)) {
|
||||
if (A->getOption().matches(options::OPT_mfp32))
|
||||
Features.push_back(Args.MakeArgString("-fp64"));
|
||||
else if (A->getOption().matches(options::OPT_mfpxx)) {
|
||||
Features.push_back(Args.MakeArgString("+fpxx"));
|
||||
Features.push_back(Args.MakeArgString("+nooddspreg"));
|
||||
} else
|
||||
Features.push_back(Args.MakeArgString("+fp64"));
|
||||
} else if (mips::isFPXXDefault(Triple, CPUName, ABIName)) {
|
||||
Features.push_back(Args.MakeArgString("+fpxx"));
|
||||
Features.push_back(Args.MakeArgString("+nooddspreg"));
|
||||
}
|
||||
|
||||
AddTargetFeature(Args, Features, options::OPT_mno_odd_spreg,
|
||||
options::OPT_modd_spreg, "nooddspreg");
|
||||
}
|
||||
|
@ -1612,7 +1629,7 @@ static void getTargetFeatures(const Driver &D, const llvm::Triple &Triple,
|
|||
case llvm::Triple::mipsel:
|
||||
case llvm::Triple::mips64:
|
||||
case llvm::Triple::mips64el:
|
||||
getMIPSTargetFeatures(D, Args, Features);
|
||||
getMIPSTargetFeatures(D, Triple, Args, Features);
|
||||
break;
|
||||
|
||||
case llvm::Triple::arm:
|
||||
|
@ -5201,6 +5218,22 @@ bool mips::isNaN2008(const ArgList &Args, const llvm::Triple &Triple) {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool mips::isFPXXDefault(const llvm::Triple &Triple, StringRef CPUName,
|
||||
StringRef ABIName) {
|
||||
if (Triple.getVendor() != llvm::Triple::ImaginationTechnologies &&
|
||||
Triple.getVendorName() != "mti")
|
||||
return false;
|
||||
|
||||
if (ABIName != "32")
|
||||
return false;
|
||||
|
||||
return llvm::StringSwitch<bool>(CPUName)
|
||||
.Cases("mips2", "mips3", "mips4", "mips5", true)
|
||||
.Cases("mips32", "mips32r2", true)
|
||||
.Cases("mips64", "mips64r2", true)
|
||||
.Default(false);
|
||||
}
|
||||
|
||||
llvm::Triple::ArchType darwin::getArchTypeForMachOArchName(StringRef Str) {
|
||||
// See arch(3) and llvm-gcc's driver-driver.c. We don't implement support for
|
||||
// archs which Darwin doesn't use.
|
||||
|
@ -6897,12 +6930,19 @@ void gnutools::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
StringRef CPUName;
|
||||
StringRef ABIName;
|
||||
getMipsCPUAndABI(Args, getToolChain().getTriple(), CPUName, ABIName);
|
||||
ABIName = getGnuCompatibleMipsABIName(ABIName);
|
||||
|
||||
CmdArgs.push_back("-march");
|
||||
CmdArgs.push_back(CPUName.data());
|
||||
|
||||
CmdArgs.push_back("-mabi");
|
||||
CmdArgs.push_back(getGnuCompatibleMipsABIName(ABIName).data());
|
||||
CmdArgs.push_back(ABIName.data());
|
||||
|
||||
// LLVM doesn't support -mabicalls yet and acts as if it is always given.
|
||||
CmdArgs.push_back("-mno-shared");
|
||||
// LLVM doesn't support -mplt yet and acts as if it is always given.
|
||||
// However, -mplt has no effect with the N64 ABI.
|
||||
CmdArgs.push_back(ABIName == "64" ? "-KPIC" : "-call_nonpic");
|
||||
|
||||
if (getToolChain().getArch() == llvm::Triple::mips ||
|
||||
getToolChain().getArch() == llvm::Triple::mips64)
|
||||
|
@ -6915,8 +6955,28 @@ void gnutools::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
CmdArgs.push_back(Args.MakeArgString("-mnan=2008"));
|
||||
}
|
||||
|
||||
Args.AddLastArg(CmdArgs, options::OPT_mfp32, options::OPT_mfp64);
|
||||
Args.AddLastArg(CmdArgs, options::OPT_mips16, options::OPT_mno_mips16);
|
||||
// Add the last -mfp32/-mfpxx/-mfp64 or -mfpxx if it is enabled by default.
|
||||
if (Arg *A = Args.getLastArg(options::OPT_mfp32, options::OPT_mfpxx,
|
||||
options::OPT_mfp64)) {
|
||||
A->claim();
|
||||
A->render(Args, CmdArgs);
|
||||
} else if (mips::isFPXXDefault(getToolChain().getTriple(), CPUName,
|
||||
ABIName))
|
||||
CmdArgs.push_back("-mfpxx");
|
||||
|
||||
// Pass on -mmips16 or -mno-mips16. However, the assembler equivalent of
|
||||
// -mno-mips16 is actually -no-mips16.
|
||||
if (Arg *A = Args.getLastArg(options::OPT_mips16,
|
||||
options::OPT_mno_mips16)) {
|
||||
if (A->getOption().matches(options::OPT_mips16)) {
|
||||
A->claim();
|
||||
A->render(Args, CmdArgs);
|
||||
} else {
|
||||
A->claim();
|
||||
CmdArgs.push_back("-no-mips16");
|
||||
}
|
||||
}
|
||||
|
||||
Args.AddLastArg(CmdArgs, options::OPT_mmicromips,
|
||||
options::OPT_mno_micromips);
|
||||
Args.AddLastArg(CmdArgs, options::OPT_mdsp, options::OPT_mno_dsp);
|
||||
|
@ -6929,6 +6989,12 @@ void gnutools::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
CmdArgs.push_back(Args.MakeArgString("-mmsa"));
|
||||
}
|
||||
|
||||
Args.AddLastArg(CmdArgs, options::OPT_mhard_float,
|
||||
options::OPT_msoft_float);
|
||||
|
||||
Args.AddLastArg(CmdArgs, options::OPT_modd_spreg,
|
||||
options::OPT_mno_odd_spreg);
|
||||
|
||||
NeedsKPIC = true;
|
||||
} else if (getToolChain().getArch() == llvm::Triple::systemz) {
|
||||
// Always pass an -march option, since our default of z10 is later
|
||||
|
|
|
@ -219,6 +219,8 @@ namespace arm {
|
|||
namespace mips {
|
||||
bool hasMipsAbiArg(const llvm::opt::ArgList &Args, const char *Value);
|
||||
bool isNaN2008(const llvm::opt::ArgList &Args, const llvm::Triple &Triple);
|
||||
bool isFPXXDefault(const llvm::Triple &Triple, StringRef CPUName,
|
||||
StringRef ABIName);
|
||||
}
|
||||
|
||||
namespace darwin {
|
||||
|
|
|
@ -3,130 +3,136 @@
|
|||
// RUN: %clang -target mips-linux-gnu -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS32R2-EB-AS %s
|
||||
// MIPS32R2-EB-AS: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
|
||||
// RUN: %clang -target mipsel-linux-gnu -### \
|
||||
// RUN: -no-integrated-as -c -EB %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS32R2-EB-AS %s
|
||||
// MIPS32R2-EB-AS: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
|
||||
// MIPS32R2-EB-AS-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-KPIC"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -### \
|
||||
// RUN: -no-integrated-as -fPIC -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS32R2-EB-PIC %s
|
||||
// MIPS32R2-EB-PIC: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
|
||||
// MIPS32R2-EB-PIC: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
|
||||
// MIPS32R2-EB-PIC: "-KPIC"
|
||||
//
|
||||
// RUN: %clang -target mipsel-linux-gnu -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS32R2-DEF-EL-AS %s
|
||||
// MIPS32R2-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EL"
|
||||
// MIPS32R2-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EL"
|
||||
//
|
||||
// RUN: %clang -target mips64-linux-gnu -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS64R2-EB-AS %s
|
||||
// MIPS64R2-EB-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EB"
|
||||
// MIPS64R2-EB-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
|
||||
//
|
||||
// RUN: %clang -target mips64el-linux-gnu -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS64R2-DEF-EL-AS %s
|
||||
// MIPS64R2-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EL"
|
||||
// MIPS64R2-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-KPIC" "-EL"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -mabi=eabi -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-EABI %s
|
||||
// MIPS-EABI: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "eabi" "-EB"
|
||||
// MIPS-EABI: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "eabi" "-mno-shared" "-call_nonpic" "-EB"
|
||||
//
|
||||
// RUN: %clang -target mips64-linux-gnu -mabi=n32 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-N32 %s
|
||||
// MIPS-N32: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "n32" "-EB"
|
||||
// MIPS-N32: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "n32" "-mno-shared" "-call_nonpic" "-EB"
|
||||
//
|
||||
// RUN: %clang -target mipsel-linux-gnu -mabi=32 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS32R2-EL-AS %s
|
||||
// MIPS32R2-EL-AS: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EL"
|
||||
// RUN: %clang -target mips-linux-gnu -mabi=32 -### \
|
||||
// RUN: -no-integrated-as -c %s -EL 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS32R2-EL-AS %s
|
||||
// MIPS32R2-EL-AS: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EL"
|
||||
//
|
||||
// RUN: %clang -target mips64el-linux-gnu -mabi=64 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS64R2-EL-AS %s
|
||||
// MIPS64R2-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EL"
|
||||
// MIPS64R2-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-KPIC" "-EL"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -march=mips32r2 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-32R2 %s
|
||||
// MIPS-32R2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
|
||||
// MIPS-32R2: as{{(.exe)?}}" "-march" "mips32r2" "-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
|
||||
// MIPS-OCTEON: as{{(.exe)?}}" "-march" "octeon" "-mabi" "64" "-EB"
|
||||
// MIPS-OCTEON: as{{(.exe)?}}" "-march" "octeon" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -mips1 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-1 %s
|
||||
// MIPS-ALIAS-1: as{{(.exe)?}}" "-march" "mips1" "-mabi" "32" "-EB"
|
||||
// MIPS-ALIAS-1: as{{(.exe)?}}" "-march" "mips1" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -mips2 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-2 %s
|
||||
// MIPS-ALIAS-2: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-EB"
|
||||
// MIPS-ALIAS-2: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -mips3 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-3 %s
|
||||
// MIPS-ALIAS-3: as{{(.exe)?}}" "-march" "mips3" "-mabi" "32" "-EB"
|
||||
// MIPS-ALIAS-3: as{{(.exe)?}}" "-march" "mips3" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -mips4 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-4 %s
|
||||
// MIPS-ALIAS-4: as{{(.exe)?}}" "-march" "mips4" "-mabi" "32" "-EB"
|
||||
// MIPS-ALIAS-4: as{{(.exe)?}}" "-march" "mips4" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -mips5 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-5 %s
|
||||
// MIPS-ALIAS-5: as{{(.exe)?}}" "-march" "mips5" "-mabi" "32" "-EB"
|
||||
// MIPS-ALIAS-5: as{{(.exe)?}}" "-march" "mips5" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -mips32 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-32 %s
|
||||
// MIPS-ALIAS-32: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB"
|
||||
// MIPS-ALIAS-32: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -mips32r2 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-32R2 %s
|
||||
// MIPS-ALIAS-32R2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
|
||||
// MIPS-ALIAS-32R2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -mips32r6 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-32R6 %s
|
||||
// MIPS-ALIAS-32R6: as{{(.exe)?}}" "-march" "mips32r6" "-mabi" "32" "-EB"
|
||||
// MIPS-ALIAS-32R6: as{{(.exe)?}}" "-march" "mips32r6" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
|
||||
//
|
||||
// RUN: %clang -target mips64-linux-gnu -mips64 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64 %s
|
||||
// MIPS-ALIAS-64: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EB"
|
||||
// MIPS-ALIAS-64: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
|
||||
//
|
||||
// RUN: %clang -target mips64-linux-gnu -mips64r2 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64R2 %s
|
||||
// MIPS-ALIAS-64R2: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EB"
|
||||
// MIPS-ALIAS-64R2: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
|
||||
//
|
||||
// RUN: %clang -target mips64-linux-gnu -mips64r6 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64R6 %s
|
||||
// MIPS-ALIAS-64R6: as{{(.exe)?}}" "-march" "mips64r6" "-mabi" "64" "-EB"
|
||||
// MIPS-ALIAS-64R6: as{{(.exe)?}}" "-march" "mips64r6" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -mno-mips16 -mips16 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-16 %s
|
||||
// MIPS-16: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB" "-mips16"
|
||||
// MIPS-16: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mips16"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -mips16 -mno-mips16 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-N16 %s
|
||||
// MIPS-N16: as{{(.exe)?}}"
|
||||
// MIPS-N16-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-mips16"
|
||||
// MIPS-N16: -no-mips16
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -mno-micromips -mmicromips -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-MICRO %s
|
||||
// MIPS-MICRO: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB" "-mmicromips"
|
||||
// MIPS-MICRO: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mmicromips"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -mmicromips -mno-micromips -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
|
@ -137,7 +143,7 @@
|
|||
// RUN: %clang -target mips-linux-gnu -mno-dsp -mdsp -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-DSP %s
|
||||
// MIPS-DSP: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB" "-mdsp"
|
||||
// MIPS-DSP: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mdsp"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -mdsp -mno-dsp -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
|
@ -148,7 +154,7 @@
|
|||
// RUN: %clang -target mips-linux-gnu -mno-dspr2 -mdspr2 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-DSPR2 %s
|
||||
// MIPS-DSPR2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB" "-mdspr2"
|
||||
// MIPS-DSPR2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mdspr2"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -mdspr2 -mno-dspr2 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
|
@ -159,7 +165,7 @@
|
|||
// RUN: %clang -target mips-linux-gnu -mnan=legacy -mnan=2008 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-NAN2008 %s
|
||||
// MIPS-NAN2008: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB" "-mnan=2008"
|
||||
// MIPS-NAN2008: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mnan=2008"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -mnan=2008 -mnan=legacy -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
|
@ -167,20 +173,25 @@
|
|||
// MIPS-NAN-LEGACY: as{{(.exe)?}}"
|
||||
// MIPS-NAN-LEGACY-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-mnan={{.*}}"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -mfp64 -mfp32 -### \
|
||||
// RUN: %clang -target mips-linux-gnu -mfp64 -mfpxx -mfp32 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-MFP32 %s
|
||||
// MIPS-MFP32: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB" "-mfp32"
|
||||
// MIPS-MFP32: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mfp32"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -mfp32 -mfp64 -### \
|
||||
// RUN: %clang -target mips-linux-gnu -mfp32 -mfp64 -mfpxx -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-MFPXX %s
|
||||
// MIPS-MFPXX: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mfpxx"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -mfpxx -mfp32 -mfp64 -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-MFP64 %s
|
||||
// MIPS-MFP64: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB" "-mfp64"
|
||||
// MIPS-MFP64: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mfp64"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -mno-msa -mmsa -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS-MSA %s
|
||||
// MIPS-MSA: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB" "-mmsa"
|
||||
// MIPS-MSA: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mmsa"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -mmsa -mno-msa -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
|
@ -193,45 +204,60 @@
|
|||
// when the CPU name is absent from a StringSwitch in getMipsCPUAndABI()
|
||||
// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -c %s -mcpu=mips1 \
|
||||
// RUN: 2>&1 | FileCheck -check-prefix=MIPS1-EB-AS %s
|
||||
// MIPS1-EB-AS: as{{(.exe)?}}" "-march" "mips1" "-mabi" "32" "-EB"
|
||||
// MIPS1-EB-AS: as{{(.exe)?}}" "-march" "mips1" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
|
||||
// MIPS1-EB-AS-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-KPIC"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -c %s -mcpu=mips2 \
|
||||
// RUN: 2>&1 | FileCheck -check-prefix=MIPS2-EB-AS %s
|
||||
// MIPS2-EB-AS: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-EB"
|
||||
// MIPS2-EB-AS: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
|
||||
// MIPS2-EB-AS-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-KPIC"
|
||||
//
|
||||
// RUN: %clang -target mips64-linux-gnu -### -no-integrated-as -c %s -mcpu=mips3 \
|
||||
// RUN: 2>&1 | FileCheck -check-prefix=MIPS3-EB-AS %s
|
||||
// MIPS3-EB-AS: as{{(.exe)?}}" "-march" "mips3" "-mabi" "64" "-EB"
|
||||
// MIPS3-EB-AS-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-KPIC"
|
||||
// MIPS3-EB-AS: as{{(.exe)?}}" "-march" "mips3" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
|
||||
//
|
||||
// RUN: %clang -target mips64-linux-gnu -### -no-integrated-as -c %s -mcpu=mips4 \
|
||||
// RUN: 2>&1 | FileCheck -check-prefix=MIPS4-EB-AS %s
|
||||
// MIPS4-EB-AS: as{{(.exe)?}}" "-march" "mips4" "-mabi" "64" "-EB"
|
||||
// MIPS4-EB-AS-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-KPIC"
|
||||
// MIPS4-EB-AS: as{{(.exe)?}}" "-march" "mips4" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
|
||||
//
|
||||
// RUN: %clang -target mips64-linux-gnu -### -no-integrated-as -c %s -mcpu=mips5 \
|
||||
// RUN: 2>&1 | FileCheck -check-prefix=MIPS5-EB-AS %s
|
||||
// MIPS5-EB-AS: as{{(.exe)?}}" "-march" "mips5" "-mabi" "64" "-EB"
|
||||
// MIPS5-EB-AS-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-KPIC"
|
||||
// MIPS5-EB-AS: as{{(.exe)?}}" "-march" "mips5" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -c %s -mcpu=mips32 \
|
||||
// RUN: 2>&1 | FileCheck -check-prefix=MIPS32-EB-AS %s
|
||||
// MIPS32-EB-AS: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB"
|
||||
// MIPS32-EB-AS: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
|
||||
// MIPS32-EB-AS-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-KPIC"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -c %s -mcpu=mips32r6 \
|
||||
// RUN: 2>&1 | FileCheck -check-prefix=MIPS32R6-EB-AS %s
|
||||
// MIPS32R6-EB-AS: as{{(.exe)?}}" "-march" "mips32r6" "-mabi" "32" "-EB"
|
||||
// MIPS32R6-EB-AS: as{{(.exe)?}}" "-march" "mips32r6" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
|
||||
// MIPS32R6-EB-AS-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-KPIC"
|
||||
//
|
||||
// RUN: %clang -target mips64-linux-gnu -### -no-integrated-as -c %s -mcpu=mips64 \
|
||||
// RUN: 2>&1 | FileCheck -check-prefix=MIPS64-EB-AS %s
|
||||
// MIPS64-EB-AS: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EB"
|
||||
// MIPS64-EB-AS-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-KPIC"
|
||||
// MIPS64-EB-AS: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
|
||||
//
|
||||
// RUN: %clang -target mips64-linux-gnu -### -no-integrated-as -c %s -mcpu=mips64r6 \
|
||||
// RUN: 2>&1 | FileCheck -check-prefix=MIPS64R6-EB-AS %s
|
||||
// MIPS64R6-EB-AS: as{{(.exe)?}}" "-march" "mips64r6" "-mabi" "64" "-EB"
|
||||
// MIPS64R6-EB-AS-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-KPIC"
|
||||
// MIPS64R6-EB-AS: as{{(.exe)?}}" "-march" "mips64r6" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -msoft-float -mhard-float -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=HARDFLOAT --implicit-check-not=-msoft-float %s
|
||||
// HARDFLOAT: as{{(.exe)?}}"
|
||||
// HARDFLOAT: -mhard-float
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -mhard-float -msoft-float -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=SOFTFLOAT --implicit-check-not=-mhard-float %s
|
||||
// SOFTFLOAT: as{{(.exe)?}}"
|
||||
// SOFTFLOAT: -msoft-float
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -mno-odd-spreg -modd-spreg -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=ODDSPREG --implicit-check-not=-mno-odd-spreg %s
|
||||
// ODDSPREG: as{{(.exe)?}}"
|
||||
// ODDSPREG: -modd-spreg
|
||||
//
|
||||
// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -modd-spreg -mno-odd-spreg -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=NOODDSPREG --implicit-check-not=-modd-spreg %s
|
||||
// NOODDSPREG: as{{(.exe)?}}"
|
||||
// NOODDSPREG: -mno-odd-spreg
|
||||
|
|
|
@ -4,26 +4,30 @@
|
|||
// RUN: -EL -no-integrated-as %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS32-EL %s
|
||||
// MIPS32-EL: "{{.*}}clang{{.*}}" "-cc1" "-triple" "mipsel-unknown-linux-gnu"
|
||||
// MIPS32-EL: "{{.*}}as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EL"
|
||||
// MIPS32-EL: "{{.*}}as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32"
|
||||
// MIPS32-EL: "-EL"
|
||||
// MIPS32-EL: "{{.*}}ld{{(.exe)?}}" {{.*}} "-m" "elf32ltsmip"
|
||||
//
|
||||
// RUN: %clang -no-canonical-prefixes -target mips64-unknown-linux-gnu -### \
|
||||
// RUN: -EL -no-integrated-as %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS64-EL %s
|
||||
// MIPS64-EL: "{{.*}}clang{{.*}}" "-cc1" "-triple" "mips64el-unknown-linux-gnu"
|
||||
// MIPS64-EL: "{{.*}}as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EL"
|
||||
// MIPS64-EL: "{{.*}}as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64"
|
||||
// MIPS64-EL: "-EL"
|
||||
// MIPS64-EL: "{{.*}}ld{{(.exe)?}}" {{.*}} "-m" "elf64ltsmip"
|
||||
//
|
||||
// RUN: %clang -no-canonical-prefixes -target mipsel-unknown-linux-gnu -### \
|
||||
// RUN: -EB -no-integrated-as %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS32-EB %s
|
||||
// MIPS32-EB: "{{.*}}clang{{.*}}" "-cc1" "-triple" "mips-unknown-linux-gnu"
|
||||
// MIPS32-EB: "{{.*}}as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
|
||||
// MIPS32-EB: "{{.*}}as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32"
|
||||
// MIPS32-EB: "-EB"
|
||||
// MIPS32-EB: "{{.*}}ld{{(.exe)?}}" {{.*}} "-m" "elf32btsmip"
|
||||
//
|
||||
// RUN: %clang -no-canonical-prefixes -target mips64el-unknown-linux-gnu -### \
|
||||
// RUN: -EB -no-integrated-as %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=MIPS64-EB %s
|
||||
// MIPS64-EB: "{{.*}}clang{{.*}}" "-cc1" "-triple" "mips64-unknown-linux-gnu"
|
||||
// MIPS64-EB: "{{.*}}as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EB"
|
||||
// MIPS64-EB: "{{.*}}as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64"
|
||||
// MIPS64-EB: "-EB"
|
||||
// MIPS64-EB: "{{.*}}ld{{(.exe)?}}" {{.*}} "-m" "elf64btsmip"
|
||||
|
|
Loading…
Reference in New Issue