forked from OSchip/llvm-project
[driver][mips] Pass long-calls feature flag to the MIPS backend
Check the `-mlong-calls` command line option and pass the `long-calls` feature flag to the backend. Handling of this feature flag in the backend needs to be implemented by a separate commit. llvm-svn: 307386
This commit is contained in:
parent
5ff6b8655a
commit
df406d18aa
|
@ -299,6 +299,8 @@ void mips::getMIPSTargetFeatures(const Driver &D, const llvm::Triple &Triple,
|
|||
options::OPT_modd_spreg, "nooddspreg");
|
||||
AddTargetFeature(Args, Features, options::OPT_mno_madd4, options::OPT_mmadd4,
|
||||
"nomadd4");
|
||||
AddTargetFeature(Args, Features, options::OPT_mlong_calls,
|
||||
options::OPT_mno_long_calls, "long-calls");
|
||||
}
|
||||
|
||||
mips::NanEncoding mips::getSupportedNanEncoding(StringRef &CPU) {
|
||||
|
|
|
@ -247,3 +247,14 @@
|
|||
// RUN: | FileCheck --check-prefix=CHECK-IMG-SINGLEFLOAT-FPXX %s
|
||||
// CHECK-IMG-SINGLEFLOAT-FPXX: "-target-feature" "+single-float"
|
||||
// CHECK-IMG-SINGLEFLOAT-FPXX: "-target-feature" "+fpxx"
|
||||
|
||||
// -mlong-call
|
||||
// RUN: %clang -target mips-img-linux-gnu -### -c %s -mlong-calls 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=LONG-CALLS-ON %s
|
||||
// RUN: %clang -target mips-img-linux-gnu -### -c %s -mno-long-calls 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=LONG-CALLS-OFF %s
|
||||
// RUN: %clang -target mips-img-linux-gnu -### -c %s 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=LONG-CALLS-DEF %s
|
||||
// LONG-CALLS-ON: "-target-feature" "+long-calls"
|
||||
// LONG-CALLS-OFF: "-target-feature" "-long-calls"
|
||||
// LONG-CALLS-DEF-NOT: "long-calls"
|
||||
|
|
Loading…
Reference in New Issue