[PATCH] D52551: [ARM] Allow execute only code on Cortex-m23
David Spickett via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 26 07:34:11 PDT 2018
DavidSpickett created this revision.
Herald added a reviewer: javed.absar.
Herald added subscribers: llvm-commits, chrib, kristof.beyls.
The NoMovt feature prevents the use of MOVW/MOVT instructions on Cortex-M23 for performance reasons.
These instructions are required for execute only code so NoMovt should be disabled when that option is enabled.
Repository:
rL LLVM
https://reviews.llvm.org/D52551
Files:
lib/Target/ARM/ARMSubtarget.cpp
test/CodeGen/ARM/execute-only-big-stack-frame.ll
test/CodeGen/ARM/execute-only-section.ll
test/CodeGen/ARM/execute-only.ll
Index: test/CodeGen/ARM/execute-only.ll
===================================================================
--- test/CodeGen/ARM/execute-only.ll
+++ test/CodeGen/ARM/execute-only.ll
@@ -1,0 +2 @@
+; RUN: llc -mtriple=thumbv8m.base-eabi -mcpu=cortex-m23 -mattr=+execute-only %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CHECK-T2BASE %s
Index: test/CodeGen/ARM/execute-only-section.ll
===================================================================
--- test/CodeGen/ARM/execute-only-section.ll
+++ test/CodeGen/ARM/execute-only-section.ll
@@ -2,0 +3 @@
+; RUN: llc < %s -mtriple=thumbv8m.base -mcpu=cortex-m23 -mattr=+execute-only %s -o - | FileCheck %s
Index: test/CodeGen/ARM/execute-only-big-stack-frame.ll
===================================================================
--- test/CodeGen/ARM/execute-only-big-stack-frame.ll
+++ test/CodeGen/ARM/execute-only-big-stack-frame.ll
@@ -4,0 +5,2 @@
+; RUN: llc < %s -mtriple=thumbv8m.base -mcpu=cortex-m23 -mattr=+execute-only -O0 %s -o - \
+; RUN: | FileCheck --check-prefix=CHECK-MOVW-MOVT-ADD %s
Index: lib/Target/ARM/ARMSubtarget.cpp
===================================================================
--- lib/Target/ARM/ARMSubtarget.cpp
+++ lib/Target/ARM/ARMSubtarget.cpp
@@ -191,2 +191,5 @@
- if (genExecuteOnly())
- assert(hasV8MBaselineOps() && !NoMovt && "Cannot generate execute-only code for this target");
+ if (genExecuteOnly()) {
+ NoMovt = false;
+ assert(hasV8MBaselineOps() &&
+ "Cannot generate execute-only code for this target");
+ }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52551.167129.patch
Type: text/x-patch
Size: 1542 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180926/98d49aa3/attachment.bin>
More information about the llvm-commits
mailing list