From: Hal Finkel Date: Tue, 30 Aug 2016 01:07:03 +0000 (+0000) Subject: [PowerPC] Add support for -mlongcall X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d3d6242296d3260d712997da1e1ba28962dd7513;p=clang [PowerPC] Add support for -mlongcall Add support for GCC's PowerPC -mlongcall option; the backend supports the corresponding target feature as of r280040. Fixes PR19098. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280041 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 0a2962b5b8..98a23b21fc 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -1598,6 +1598,10 @@ def mfloat128: Flag<["-"], "mfloat128">, Group; def mno_float128 : Flag<["-"], "mno-float128">, Group; +def mlongcall: Flag<["-"], "mlongcall">, + Group; +def mno_longcall : Flag<["-"], "mno-longcall">, + Group; def faltivec : Flag<["-"], "faltivec">, Group, Flags<[CC1Option]>, HelpText<"Enable AltiVec vector initializer syntax">; diff --git a/test/Driver/ppc-features.cpp b/test/Driver/ppc-features.cpp index 34c1ce5cc4..3b2b02c6e8 100644 --- a/test/Driver/ppc-features.cpp +++ b/test/Driver/ppc-features.cpp @@ -163,6 +163,12 @@ // RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-crbits -mcrbits -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-CRBITS %s // CHECK-CRBITS: "-target-feature" "+crbits" +// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-longcall -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOLONGCALL %s +// CHECK-NOLONGCALL: "-target-feature" "-longcall" + +// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-longcall -mlongcall -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-LONGCALL %s +// CHECK-LONGCALL: "-target-feature" "+longcall" + // RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-invariant-function-descriptors -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOINVFUNCDESC %s // CHECK-NOINVFUNCDESC: "-target-feature" "-invariant-function-descriptors"