diff options
author | Prakhar Bahuguna <prakhar.bahuguna@arm.com> | 2016-12-15 07:59:24 +0000 |
---|---|---|
committer | Prakhar Bahuguna <prakhar.bahuguna@arm.com> | 2016-12-15 07:59:24 +0000 |
commit | 363cb41c53b4b03af2129fdcaa5f09a8ec37cd17 (patch) | |
tree | d91eeebd41a86639154027c7fa8940503c3de10b /include/clang/Basic/DiagnosticCommonKinds.td | |
parent | 97e0cdeaaa5accddbe79fb7b741d4ec020aa71cd (diff) |
[ARM] Implement execute-only support in CodeGen
Summary:
This implements execute-only support for ARM code generation, which
prevents the compiler from generating data accesses to code sections.
The following changes are involved:
* Add the CodeGen option "-arm-execute-only" to the ARM code generator.
* Add the clang flag "-mexecute-only" as well as the GCC-compatible
alias "-mpure-code" to enable this option.
* When enabled, literal pools are replaced with MOVW/MOVT instructions,
with VMOV used in addition for floating-point literals. As the MOVT
instruction is required, execute-only support is only available in
Thumb mode for targets supporting ARMv8-M baseline or Thumb2.
* Jump tables are placed in data sections when in execute-only mode.
* The execute-only text section is assigned section ID 0, and is
marked as unreadable with the SHF_ARM_PURECODE flag with symbol 'y'.
This also overrides selection of ELF sections for globals.
Reviewers: t.p.northover, rengolin
Subscribers: llvm-commits, aemerson
Differential Revision: https://reviews.llvm.org/D27450
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289786 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticCommonKinds.td')
-rw-r--r-- | include/clang/Basic/DiagnosticCommonKinds.td | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticCommonKinds.td b/include/clang/Basic/DiagnosticCommonKinds.td index adc74d9619..e8180eb1db 100644 --- a/include/clang/Basic/DiagnosticCommonKinds.td +++ b/include/clang/Basic/DiagnosticCommonKinds.td @@ -190,6 +190,8 @@ def err_target_unsupported_fpmath : Error< "the '%0' unit is not supported with this instruction set">; def err_target_unsupported_unaligned : Error< "the %0 sub-architecture does not support unaligned accesses">; +def err_target_unsupported_execute_only : Error< + "execute only is not supported for the %0 sub-architecture">; def err_opt_not_valid_with_opt : Error< "option '%0' cannot be specified with '%1'">; |