[PATCH] D52551: [ARM] Allow execute only code on Cortex-m23

David Spickett via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 28 01:57:20 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL343302: [ARM] Allow execute only code on Cortex-m23 (authored by DavidSpickett, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D52551?vs=167136&id=167439#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D52551

Files:
  llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp
  llvm/trunk/test/CodeGen/ARM/execute-only-big-stack-frame.ll
  llvm/trunk/test/CodeGen/ARM/execute-only-section.ll
  llvm/trunk/test/CodeGen/ARM/execute-only.ll


Index: llvm/trunk/test/CodeGen/ARM/execute-only.ll
===================================================================
--- llvm/trunk/test/CodeGen/ARM/execute-only.ll
+++ llvm/trunk/test/CodeGen/ARM/execute-only.ll
@@ -1,4 +1,5 @@
 ; RUN: llc -mtriple=thumbv8m.base-eabi -mattr=+execute-only %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CHECK-T2BASE %s
+; RUN: llc -mtriple=thumbv8m.base-eabi -mcpu=cortex-m23 -mattr=+execute-only %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CHECK-T2BASE %s
 ; RUN: llc -mtriple=thumbv7m-eabi      -mattr=+execute-only %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CHECK-T2 %s
 ; RUN: llc -mtriple=thumbv8m.main-eabi -mattr=+execute-only %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CHECK-T2 %s
 
Index: llvm/trunk/test/CodeGen/ARM/execute-only-section.ll
===================================================================
--- llvm/trunk/test/CodeGen/ARM/execute-only-section.ll
+++ llvm/trunk/test/CodeGen/ARM/execute-only-section.ll
@@ -1,5 +1,6 @@
 ; RUN: llc < %s -mtriple=thumbv7m -mattr=+execute-only %s -o - | FileCheck %s
 ; RUN: llc < %s -mtriple=thumbv8m.base -mattr=+execute-only %s -o - | FileCheck %s
+; RUN: llc < %s -mtriple=thumbv8m.base -mcpu=cortex-m23 -mattr=+execute-only %s -o - | FileCheck %s
 ; RUN: llc < %s -mtriple=thumbv8m.main -mattr=+execute-only %s -o - | FileCheck %s
 
 ; CHECK:     .section .text,"axy",%progbits,unique,0
Index: llvm/trunk/test/CodeGen/ARM/execute-only-big-stack-frame.ll
===================================================================
--- llvm/trunk/test/CodeGen/ARM/execute-only-big-stack-frame.ll
+++ llvm/trunk/test/CodeGen/ARM/execute-only-big-stack-frame.ll
@@ -2,6 +2,8 @@
 ; RUN:  | FileCheck --check-prefix=CHECK-SUBW-ADDW %s
 ; RUN: llc < %s -mtriple=thumbv8m.base -mattr=+execute-only -O0 %s -o - \
 ; RUN:  | FileCheck --check-prefix=CHECK-MOVW-MOVT-ADD %s
+; RUN: llc < %s -mtriple=thumbv8m.base -mcpu=cortex-m23 -mattr=+execute-only -O0 %s -o - \
+; RUN:  | FileCheck --check-prefix=CHECK-MOVW-MOVT-ADD %s
 ; RUN: llc < %s -mtriple=thumbv8m.main -mattr=+execute-only -O0 %s -o - \
 ; RUN:  | FileCheck --check-prefix=CHECK-SUBW-ADDW %s
 
Index: llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp
===================================================================
--- llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp
+++ llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp
@@ -188,8 +188,10 @@
   assert(hasV6T2Ops() || !hasThumb2());
 
   // Execute only support requires movt support
-  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");
+  }
 
   // Keep a pointer to static instruction cost data for the specified CPU.
   SchedModel = getSchedModelForCPU(CPUString);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52551.167439.patch
Type: text/x-patch
Size: 2902 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180928/c03064df/attachment.bin>


More information about the llvm-commits mailing list