summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorPrakhar Bahuguna <prakhar.bahuguna@arm.com>2016-12-15 07:59:24 +0000
committerPrakhar Bahuguna <prakhar.bahuguna@arm.com>2016-12-15 07:59:24 +0000
commit61ef150d53e4a9a3f14f614991f8132a5bb4eedc (patch)
tree26ccb494e777451cb3bfc318770d4e628a53d523 /clang/lib/CodeGen/CodeGenModule.cpp
parente640c6f765c82c0fefd3b231e0e7022d33cc82c9 (diff)
downloadbcm5719-llvm-61ef150d53e4a9a3f14f614991f8132a5bb4eedc.tar.gz
bcm5719-llvm-61ef150d53e4a9a3f14f614991f8132a5bb4eedc.zip
[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 llvm-svn: 289786
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud