diff options
author | Hal Finkel <hfinkel@anl.gov> | 2015-01-15 21:22:22 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2015-01-15 21:22:22 +0000 |
commit | 74618cc622a0d2764a41e8c596539c051f13ca6b (patch) | |
tree | 9c7c2e7940a9109bfede0181d7c39d6b54e58b4b /clang | |
parent | fd76d91366016494ef1915ae9481d81ed61d339d (diff) | |
download | bcm5719-llvm-74618cc622a0d2764a41e8c596539c051f13ca6b.tar.gz bcm5719-llvm-74618cc622a0d2764a41e8c596539c051f13ca6b.zip |
[PowerPC] Add a target option for invariant function descriptors
The PPC backend will now assume that PPC64 ELFv1 function descriptors are
invariant. This must be true for well-defined C/C++ code, but I'm providing an
option to disable this assumption in case someone's JIT-engine needs it.
llvm-svn: 226209
Diffstat (limited to 'clang')
-rw-r--r-- | clang/include/clang/Driver/Options.td | 5 | ||||
-rw-r--r-- | clang/test/Driver/ppc-features.cpp | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 4daddba332d..5b58a57dca6 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -1228,6 +1228,11 @@ def mqpx : Flag<["-"], "mqpx">, Group<m_ppc_Features_Group>; def mno_qpx : Flag<["-"], "mno-qpx">, Group<m_ppc_Features_Group>; def mcrbits : Flag<["-"], "mcrbits">, Group<m_ppc_Features_Group>; def mno_crbits : Flag<["-"], "mno-crbits">, Group<m_ppc_Features_Group>; +def minvariant_function_descriptors : + Flag<["-"], "minvariant-function-descriptors">, Group<m_ppc_Features_Group>; +def mno_invariant_function_descriptors : + Flag<["-"], "mno-invariant-function-descriptors">, + Group<m_ppc_Features_Group>; def faltivec : Flag<["-"], "faltivec">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Enable AltiVec vector initializer syntax">; diff --git a/clang/test/Driver/ppc-features.cpp b/clang/test/Driver/ppc-features.cpp index f7cc879f39a..39d6357dccd 100644 --- a/clang/test/Driver/ppc-features.cpp +++ b/clang/test/Driver/ppc-features.cpp @@ -113,6 +113,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-invariant-function-descriptors -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOINVFUNCDESC %s +// CHECK-NOINVFUNCDESC: "-target-feature" "-invariant-function-descriptors" + +// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-invariant-function-descriptors -minvariant-function-descriptors -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-INVFUNCDESC %s +// CHECK-INVFUNCDESC: "-target-feature" "+invariant-function-descriptors" + // Assembler features // RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o -no-integrated-as 2>&1 | FileCheck -check-prefix=CHECK_BE_AS_ARGS %s // CHECK_BE_AS_ARGS: "-mppc64" |