<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p>Hi Eric,</p>
<p><br>
</p>
<p>Sorry for the delay in responding. <span style="font-size: 12pt;">I have looked into this more and have a few more topics for discussion. Initially, Prakhar had created a new default .text section with the PURECODE flag set that was used instead of the default
.text section. This was in ARMElfTargetObjectFile::Initialize:</span></p>
<p><br>
</p>
<p><span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">+ // Make code section unreadable when in execute-only mode</span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">
<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">+ if (genExecuteOnly) {</span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">
<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">+ unsigned Type = ELF::SHT_PROGBITS;</span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">
<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">+ unsigned Flags = ELF::SHF_EXECINSTR | ELF::SHF_ALLOC | ELF::SHF_ARM_PURECODE;</span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">
<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">+ // Since we cannot modify flags for an existing section, we create a new</span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">
<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">+ // section with the right flags, and use 0 as the unique ID for</span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">
<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">+ // execute-only text</span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">
<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">+ TextSection = Ctx.getELFSection(".text", Type, Flags, 0, "", 0U);</span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">
<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">+ }</span><br>
</p>
<p><br>
</p>
<p>This snippet was removed and so leads to the generation of two .text sections as the exectue-only functions can't live in the normal .text section (when compiling with -mexecute-only).</p>
<p><br>
</p>
<p>I see what you mean about there being no clear decision against implementing the execute-only feature in this way, just alternatives that were suggested and selected. In particular using a backend option.</p>
<p><br>
</p>
<p>I have looked into your rewrite and can see that it should allow more flexibilty for LTO as the execute-only attribute is at a function level. I am perhaps not the correct person to speak about execute-only and LTO, I found previous discussions which mention
marking each function with a function attribute that details whether it is execute-only. This seems like an interesting way of gaining the flexibilty.</p>
<p><br>
</p>
<p>For now I would like to discuss the empty .text section. A linker can remove the empty .text section (given the correct conditions) that mean it will not cause issues. However, I was thinking that it would perhaps be better not to generate it at all. I've
noticed a similar effect when compiling with -ffunction-sections, each function gets emitted into its own section and there is a left over unused .text section. Perhaps it would be useful to have some option to control whether empty sections are emitted to
the object file ot not. Another solution is to be able to set the flags on the default .text sections, this would only help with the -mexecute-only case; this way the default .text section would be used and we would avoid generating a second .text section
with the correct flags.</p>
<p><br>
</p>
<p>Do you have any thoughts or alternatives?</p>
<p><br>
</p>
<p>Thanks,</p>
<p>Luke</p>
<p><br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Eric Christopher <echristo@gmail.com><br>
<b>Sent:</b> 14 July 2017 18:00:32<br>
<b>To:</b> Luke Cheeseman; llvm-commits@lists.llvm.org; Christof Douma<br>
<b>Cc:</b> nd<br>
<b>Subject:</b> Re: [llvm] r306927 - Rewrite ARM execute only support to avoid the use of a command line flag and unqualified ARMSubtarget lookup.</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hi Luke,<br>
<br>
<div class="gmail_quote">
<div dir="ltr">On Fri, Jul 14, 2017 at 7:57 AM Luke Cheeseman <<a href="mailto:Luke.Cheeseman2@arm.com">Luke.Cheeseman2@arm.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div id="m_4292749331295698774divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p><br>
</p>
<div dir="ltr">
<div id="m_4292749331295698774x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p></p>
<p style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(33,33,33)">
<span style="font-size:12pt;color:black">Hi Eric,</span></p>
<p style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(33,33,33)">
<span style="font-size:12pt;color:black"> </span></p>
<p style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(33,33,33)">
<span style="font-size:12pt;color:black">You recently commited:</span></p>
<p style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(33,33,33)">
<span style="font-size:12pt;color:black">[llvm] r306927 - Rewrite ARM execute only support to avoid the use of a command line flag and unqualified ARMSubtarget lookup.</span></p>
<p style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(33,33,33)">
<span style="font-size:12pt;color:black"> </span></p>
<p style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(33,33,33)">
<span style="font-size:12pt;color:black">This is breaking some of our testing as it changes the attributes of the default .text section, namely the section is no longer execute only. This causes two .text sections to be created (one that is execute only and
one that is not); some tools may have issues with this. For example, a linker may merge the two .text sections into one segment and remove the PURECODE flag in conformance with section 4.3.3 of <a href="http://infocenter.arm.com/help/topic/com.arm.doc.ihi0044f/IHI0044F_aaelf.pdf" rel="noopener noreferrer" style="outline:none;font-family:Calibri,sans-serif,serif,EmojiFont;font-size:14.6667px" target="_blank"><font size="3" color="black" style="font-family:Arial,sans-serif,serif,EmojiFont"><span style="font-size:12pt">http://infocenter.arm.com/help/topic/com.arm.doc.ihi0044f/IHI0044F_aaelf.pdf</span></font></a><font size="3" style="font-family:Arial,sans-serif,serif,EmojiFont"><span style="font-size:12pt"> .</span></font></span></p>
<p style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(33,33,33)">
</p>
</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Fascinating. I'm not seeing in here where it allows removing of the flag in there, but it's early and I might be missing it. Also, sounds like you're missing a compile time option on a few files in whatever build broke :)</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div id="m_4292749331295698774divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div dir="ltr">
<div id="m_4292749331295698774x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(33,33,33)">
<span style="font-size:12pt">Furthermore, in your patch you made similar changes that were initially proposed by Prakhar (namely implementing execute only as a feature flag) but were discussed and decided against. See </span><a href="https://reviews.llvm.org/D27449?id=80748#inline-237468" rel="noopener noreferrer" target="_blank"><span style="font-size:12pt">https://reviews.llvm.org/D27449?id=80748#inline-237468</span></a><span style="font-size:12pt"> . </span></p>
<p class="m_4292749331295698774x_x_MsoNormal" style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(33,33,33)">
<span style="font-size:12pt;color:black"> </span></p>
</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Yeah, that wasn't the right thing to do.</div>
<div><br>
</div>
<div>The original reviewer comment was correct and, unfortunately, this patch will need to be implemented in another way if this is the desired behavior. I did check the ABI but couldn't find anything that disallowed having sections that are both execute only
and not.</div>
<div><br>
</div>
<div>It's also not obvious on "decided against". Who decided? It definitely wasn't the original reviewer.</div>
<div><br>
</div>
<div>I think the mechanics you want are to define a module flag and error out on linking where the module flags don't match. I'm not a huge fan of them, but it is an existing mechanism here. Alternately you can go with the original reviewer and use a code gen
flag. This is easier to undo if we find some problem later, but does ignore state in the module that you might want to capture.</div>
<div><br>
</div>
<div>Thoughts?</div>
<div><br>
</div>
<div>-eric</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div id="m_4292749331295698774divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div dir="ltr">
<div id="m_4292749331295698774x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(33,33,33)">
<span style="font-size:12pt;color:black">Take the following example (part of the regression test suite):</span></p>
<p style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(33,33,33)">
</p>
<p style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(33,33,33)">
<span style="font-size:12pt;font-family:"Courier New",serif,serif,EmojiFont;color:black">$ cat test/CodeGen/ARM/execute-only-section.ll</span></p>
<p style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(33,33,33)">
<span style="font-size:12pt;font-family:"Courier New",serif,serif,EmojiFont;color:black">...</span></p>
</div>
</div>
</div>
</div>
<div dir="ltr">
<div id="m_4292749331295698774divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div dir="ltr">
<div id="m_4292749331295698774x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div style="color:rgb(33,33,33);font-size:15px">
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">; CHECK: .section .text,"axy",%progbits,unique,0</span></p>
</div>
<div style="color:rgb(33,33,33);font-size:15px">
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">; CHECK-NOT: .section</span></p>
</div>
</div>
</div>
</div>
</div>
<div dir="ltr">
<div id="m_4292749331295698774divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div dir="ltr">
<div id="m_4292749331295698774x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div style="color:rgb(33,33,33);font-size:15px">
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">; CHECK-NOT: .text</span></p>
</div>
<div style="color:rgb(33,33,33);font-size:15px">
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">; CHECK: .globl test_SectionForGlobal</span></p>
</div>
<div style="color:rgb(33,33,33);font-size:15px">
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">; CHECK: .type test_SectionForGlobal,%function</span></p>
</div>
<div style="color:rgb(33,33,33);font-size:15px">
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">define void @test_SectionForGlobal() {</span></p>
</div>
<div style="color:rgb(33,33,33);font-size:15px">
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">entry:</span></p>
</div>
<div style="color:rgb(33,33,33);font-size:15px">
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black"> ret void</span></p>
</div>
<div style="color:rgb(33,33,33);font-size:15px">
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">}</span></p>
</div>
<div style="color:rgb(33,33,33);font-size:15px">
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">...</span></p>
</div>
<div style="color:rgb(33,33,33);font-size:15px">
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">$ llc test/CodeGen/ARM/execute-only-section.ll -mtriple=thumbv7m -mattr=+execute-only -o -</span></p>
</div>
<div style="color:rgb(33,33,33);font-size:15px">
<div>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">.text</span></p>
</div>
<div>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">.syntax unified</span></p>
</div>
<div>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">.eabi_attribute</span></p>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">67, "2.09"<span class="m_4292749331295698774x_x_xapple-tab-span"> </span>@ Tag_conformance</span></p>
</div>
<div>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">....</span></p>
</div>
<div>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">"test/CodeGen/ARM/execute-only-section.ll"</span></p>
</div>
<div>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">.section</span></p>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">.text,"axy",%progbits,unique,0</span></p>
</div>
<div>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">.globl</span></p>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">test_SectionForGlobal @ -- Begin function test_SectionForGlobal</span></p>
</div>
<div>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">.p2align</span></p>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">2</span></p>
</div>
<div>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">.type</span></p>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">test_SectionForGlobal,%function</span></p>
</div>
<div>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">.code</span></p>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">16 @ @test_SectionForGlobal</span></p>
</div>
<div>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">.thumb_func</span></p>
</div>
<div>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">test_SectionForGlobal:</span></p>
</div>
<div>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">.fnstart</span></p>
</div>
<div>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">@ BB#0: @ %entry</span></p>
</div>
<div>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black">...</span></p>
</div>
<div>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt;color:black"> </span></p>
</div>
</div>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(33,33,33)">
<span style="font-size:12pt;color:black">There are now two .text sections, one which is execute only and one which is not. This test still passes however as file check finds the execute only .text section.</span></p>
<p style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(33,33,33)">
<span style="font-size:12pt;color:black"> </span></p>
<p style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(33,33,33)">
<span style="font-size:12pt;color:black">This is due to this part of the commit:</span></p>
</div>
</div>
</div>
</div>
<div dir="ltr">
<div id="m_4292749331295698774divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div dir="ltr">
<div id="m_4292749331295698774x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(33,33,33)">
<span style="font-size:10pt;font-family:Tahoma,sans-serif,serif,EmojiFont">--- llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.cpp (original)<br>
+++ llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.cpp Fri Jun 30 19:55:22 2017<br>
@@ -32,7 +32,7 @@ void ARMElfTargetObjectFile::Initialize(<br>
const TargetMachine &TM) {<br>
const ARMBaseTargetMachine &ARM_TM = static_cast<const ARMBaseTargetMachine &>(TM);<br>
bool isAAPCS_ABI = ARM_TM.TargetABI == ARMBaseTargetMachine::ARMABI::ARM_ABI_AAPCS;<br>
- genExecuteOnly = ARM_TM.getSubtargetImpl()->genExecuteOnly();<br>
+ // genExecuteOnly = ARM_TM.getSubtargetImpl()->genExecuteOnly();<br>
<br>
TargetLoweringObjectFileELF::Initialize(Ctx, TM);<br>
InitializeELF(isAAPCS_ABI);<br>
@@ -43,16 +43,6 @@ void ARMElfTargetObjectFile::Initialize(<br>
<br>
AttributesSection =<br>
getContext().getELFSection(".ARM.attributes", ELF::SHT_ARM_ATTRIBUTES, 0);<br>
-<br>
- // Make code section unreadable when in execute-only mode<br>
- if (genExecuteOnly) {<br>
- unsigned Type = ELF::SHT_PROGBITS;<br>
- unsigned Flags = ELF::SHF_EXECINSTR | ELF::SHF_ALLOC | ELF::SHF_ARM_PURECODE;<br>
- // Since we cannot modify flags for an existing section, we create a new<br>
- // section with the right flags, and use 0 as the unique ID for<br>
- // execute-only text<br>
- TextSection = Ctx.getELFSection(".text", Type, Flags, 0, "", 0U);<br>
- }<br>
}</span></p>
<p style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif;color:rgb(33,33,33)">
<span style="font-size:12pt;color:black"> </span></p>
</div>
</div>
</div>
</div>
<div dir="ltr">
<div id="m_4292749331295698774divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div dir="ltr">
<div id="m_4292749331295698774x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div style="color:rgb(33,33,33);font-size:15px">
<div>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt">Kind Regards,</span></p>
</div>
<div>
<p class="m_4292749331295698774x_x_xmsonormal" style="margin:0in 0in 0.0001pt 1in;font-size:11pt;font-family:Calibri,sans-serif">
<span style="font-size:12pt">Luke</span></p>
</div>
</div>
<br>
<p></p>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_4292749331295698774x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> llvm-commits <<a href="mailto:llvm-commits-bounces@lists.llvm.org" target="_blank">llvm-commits-bounces@lists.llvm.org</a>>
on behalf of Eric Christopher via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>><br>
<b>Sent:</b> 01 July 2017 03:55:22<br>
<b>To:</b> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<b>Subject:</b> [llvm] r306927 - Rewrite ARM execute only support to avoid the use of a command line flag and unqualified ARMSubtarget lookup.</font>
<div> </div>
</div>
</div>
</div>
</div>
<div dir="ltr">
<div id="m_4292749331295698774divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<font size="2"><span style="font-size:10pt">
<div class="m_4292749331295698774PlainText">Author: echristo<br>
Date: Fri Jun 30 19:55:22 2017<br>
New Revision: 306927<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=306927&view=rev" target="_blank">
http://llvm.org/viewvc/llvm-project?rev=306927&view=rev</a><br>
Log:<br>
Rewrite ARM execute only support to avoid the use of a command line flag and unqualified ARMSubtarget lookup.<br>
<br>
Paired with a clang commit to use the new behavior.<br>
<br>
Modified:<br>
llvm/trunk/lib/Target/ARM/ARM.td<br>
llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp<br>
llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.cpp<br>
llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.h<br>
llvm/trunk/test/CodeGen/ARM/constantfp.ll<br>
llvm/trunk/test/CodeGen/ARM/execute-only-big-stack-frame.ll<br>
llvm/trunk/test/CodeGen/ARM/execute-only-section.ll<br>
llvm/trunk/test/CodeGen/ARM/execute-only.ll<br>
<br>
Modified: llvm/trunk/lib/Target/ARM/ARM.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARM.td?rev=306927&r1=306926&r2=306927&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARM.td?rev=306927&r1=306926&r2=306927&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/ARM/ARM.td (original)<br>
+++ llvm/trunk/lib/Target/ARM/ARM.td Fri Jun 30 19:55:22 2017<br>
@@ -269,6 +269,10 @@ def FeatureLongCalls : SubtargetFeature<<br>
"Generate calls via indirect call "<br>
"instructions">;<br>
<br>
+def FeatureExecuteOnly<br>
+ : SubtargetFeature<"execute-only", "GenExecuteOnly", "true",<br>
+ "Enable the generation of execute only code.">;<br>
+<br>
def FeatureReserveR9 : SubtargetFeature<"reserve-r9", "ReserveR9", "true",<br>
"Reserve R9, making it unavailable as "<br>
"GPR">;<br>
<br>
Modified: llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp?rev=306927&r1=306926&r2=306927&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp?rev=306927&r1=306926&r2=306927&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp (original)<br>
+++ llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp Fri Jun 30 19:55:22 2017<br>
@@ -92,11 +92,6 @@ ARMSubtarget &ARMSubtarget::initializeSu<br>
return *this;<br>
}<br>
<br>
-/// EnableExecuteOnly - Enables the generation of execute-only code on supported<br>
-/// targets<br>
-static cl::opt<bool><br>
-EnableExecuteOnly("arm-execute-only");<br>
-<br>
ARMFrameLowering *ARMSubtarget::initializeFrameLowering(StringRef CPU,<br>
StringRef FS) {<br>
ARMSubtarget &STI = initializeSubtargetDependencies(CPU, FS);<br>
@@ -139,9 +134,8 @@ ARMSubtarget::ARMSubtarget(const Triple<br>
const std::string &FS,<br>
const ARMBaseTargetMachine &TM, bool IsLittle)<br>
: ARMGenSubtargetInfo(TT, CPU, FS), UseMulOps(UseFusedMulOps),<br>
- GenExecuteOnly(EnableExecuteOnly), CPUString(CPU), IsLittle(IsLittle),<br>
- TargetTriple(TT), Options(TM.Options), TM(TM),<br>
- FrameLowering(initializeFrameLowering(CPU, FS)),<br>
+ CPUString(CPU), IsLittle(IsLittle), TargetTriple(TT), Options(TM.Options),<br>
+ TM(TM), FrameLowering(initializeFrameLowering(CPU, FS)),<br>
// At this point initializeSubtargetDependencies has been called so<br>
// we can query directly.<br>
InstrInfo(isThumb1Only()<br>
<br>
Modified: llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.cpp?rev=306927&r1=306926&r2=306927&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.cpp?rev=306927&r1=306926&r2=306927&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.cpp (original)<br>
+++ llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.cpp Fri Jun 30 19:55:22 2017<br>
@@ -32,7 +32,7 @@ void ARMElfTargetObjectFile::Initialize(<br>
const TargetMachine &TM) {<br>
const ARMBaseTargetMachine &ARM_TM = static_cast<const ARMBaseTargetMachine &>(TM);<br>
bool isAAPCS_ABI = ARM_TM.TargetABI == ARMBaseTargetMachine::ARMABI::ARM_ABI_AAPCS;<br>
- genExecuteOnly = ARM_TM.getSubtargetImpl()->genExecuteOnly();<br>
+ // genExecuteOnly = ARM_TM.getSubtargetImpl()->genExecuteOnly();<br>
<br>
TargetLoweringObjectFileELF::Initialize(Ctx, TM);<br>
InitializeELF(isAAPCS_ABI);<br>
@@ -43,16 +43,6 @@ void ARMElfTargetObjectFile::Initialize(<br>
<br>
AttributesSection =<br>
getContext().getELFSection(".ARM.attributes", ELF::SHT_ARM_ATTRIBUTES, 0);<br>
-<br>
- // Make code section unreadable when in execute-only mode<br>
- if (genExecuteOnly) {<br>
- unsigned Type = ELF::SHT_PROGBITS;<br>
- unsigned Flags = ELF::SHF_EXECINSTR | ELF::SHF_ALLOC | ELF::SHF_ARM_PURECODE;<br>
- // Since we cannot modify flags for an existing section, we create a new<br>
- // section with the right flags, and use 0 as the unique ID for<br>
- // execute-only text<br>
- TextSection = Ctx.getELFSection(".text", Type, Flags, 0, "", 0U);<br>
- }<br>
}<br>
<br>
const MCExpr *ARMElfTargetObjectFile::getTTypeGlobalReference(<br>
@@ -74,21 +64,27 @@ getDebugThreadLocalSymbol(const MCSymbol<br>
getContext());<br>
}<br>
<br>
-MCSection *<br>
-ARMElfTargetObjectFile::getExplicitSectionGlobal(const GlobalObject *GO,<br>
- SectionKind SK, const TargetMachine &TM) const {<br>
+static bool isExecuteOnlyFunction(const GlobalObject *GO, SectionKind SK,<br>
+ const TargetMachine &TM) {<br>
+ if (const Function *F = dyn_cast<Function>(GO))<br>
+ if (TM.getSubtarget<ARMSubtarget>(*F).genExecuteOnly() && SK.isText())<br>
+ return true;<br>
+ return false;<br>
+}<br>
+<br>
+MCSection *ARMElfTargetObjectFile::getExplicitSectionGlobal(<br>
+ const GlobalObject *GO, SectionKind SK, const TargetMachine &TM) const {<br>
// Set execute-only access for the explicit section<br>
- if (genExecuteOnly && SK.isText())<br>
+ if (isExecuteOnlyFunction(GO, SK, TM))<br>
SK = SectionKind::getExecuteOnly();<br>
<br>
return TargetLoweringObjectFileELF::getExplicitSectionGlobal(GO, SK, TM);<br>
}<br>
<br>
-MCSection *<br>
-ARMElfTargetObjectFile::SelectSectionForGlobal(const GlobalObject *GO,<br>
- SectionKind SK, const TargetMachine &TM) const {<br>
+MCSection *ARMElfTargetObjectFile::SelectSectionForGlobal(<br>
+ const GlobalObject *GO, SectionKind SK, const TargetMachine &TM) const {<br>
// Place the global in the execute-only text section<br>
- if (genExecuteOnly && SK.isText())<br>
+ if (isExecuteOnlyFunction(GO, SK, TM))<br>
SK = SectionKind::getExecuteOnly();<br>
<br>
return TargetLoweringObjectFileELF::SelectSectionForGlobal(GO, SK, TM);<br>
<br>
Modified: llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.h?rev=306927&r1=306926&r2=306927&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.h?rev=306927&r1=306926&r2=306927&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.h (original)<br>
+++ llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.h Fri Jun 30 19:55:22 2017<br>
@@ -16,8 +16,6 @@<br>
namespace llvm {<br>
<br>
class ARMElfTargetObjectFile : public TargetLoweringObjectFileELF {<br>
- mutable bool genExecuteOnly = false;<br>
-<br>
protected:<br>
const MCSection *AttributesSection = nullptr;<br>
<br>
<br>
Modified: llvm/trunk/test/CodeGen/ARM/constantfp.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/constantfp.ll?rev=306927&r1=306926&r2=306927&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/constantfp.ll?rev=306927&r1=306926&r2=306927&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/CodeGen/ARM/constantfp.ll (original)<br>
+++ llvm/trunk/test/CodeGen/ARM/constantfp.ll Fri Jun 30 19:55:22 2017<br>
@@ -5,25 +5,25 @@<br>
; RUN: llc -mtriple=thumbv7m -mcpu=cortex-m4 %s -o - \<br>
; RUN: | FileCheck --check-prefix=CHECK-NO-XO %s<br>
<br>
-; RUN: llc -mtriple=thumbv7m -arm-execute-only -mcpu=cortex-m4 %s -o - \<br>
+; RUN: llc -mtriple=thumbv7m -mattr=+execute-only -mcpu=cortex-m4 %s -o - \<br>
; RUN: | FileCheck --check-prefix=CHECK-XO-FLOAT --check-prefix=CHECK-XO-DOUBLE %s<br>
<br>
-; RUN: llc -mtriple=thumbv7meb -arm-execute-only -mcpu=cortex-m4 %s -o - \<br>
+; RUN: llc -mtriple=thumbv7meb -mattr=+execute-only -mcpu=cortex-m4 %s -o - \<br>
; RUN: | FileCheck --check-prefix=CHECK-XO-FLOAT --check-prefix=CHECK-XO-DOUBLE-BE %s<br>
<br>
-; RUN: llc -mtriple=thumbv7m -arm-execute-only -mcpu=cortex-m4 -relocation-model=ropi %s -o - \<br>
+; RUN: llc -mtriple=thumbv7m -mattr=+execute-only -mcpu=cortex-m4 -relocation-model=ropi %s -o - \<br>
; RUN: | FileCheck --check-prefix=CHECK-XO-ROPI %s<br>
<br>
; RUN: llc -mtriple=thumbv8m.main -mattr=fp-armv8 %s -o - \<br>
; RUN: | FileCheck --check-prefix=CHECK-NO-XO %s<br>
<br>
-; RUN: llc -mtriple=thumbv8m.main -arm-execute-only -mattr=fp-armv8 %s -o - \<br>
+; RUN: llc -mtriple=thumbv8m.main -mattr=+execute-only -mattr=fp-armv8 %s -o - \<br>
; RUN: | FileCheck --check-prefix=CHECK-XO-FLOAT --check-prefix=CHECK-XO-DOUBLE %s<br>
<br>
-; RUN: llc -mtriple=thumbv8m.maineb -arm-execute-only -mattr=fp-armv8 %s -o - \<br>
+; RUN: llc -mtriple=thumbv8m.maineb -mattr=+execute-only -mattr=fp-armv8 %s -o - \<br>
; RUN: | FileCheck --check-prefix=CHECK-XO-FLOAT --check-prefix=CHECK-XO-DOUBLE-BE %s<br>
<br>
-; RUN: llc -mtriple=thumbv8m.main -arm-execute-only -mattr=fp-armv8 -relocation-model=ropi %s -o - \<br>
+; RUN: llc -mtriple=thumbv8m.main -mattr=+execute-only -mattr=fp-armv8 -relocation-model=ropi %s -o - \<br>
; RUN: | FileCheck --check-prefix=CHECK-XO-ROPI %s<br>
<br>
define arm_aapcs_vfpcc float @test_vmov_f32() {<br>
<br>
Modified: llvm/trunk/test/CodeGen/ARM/execute-only-big-stack-frame.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/execute-only-big-stack-frame.ll?rev=306927&r1=306926&r2=306927&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/execute-only-big-stack-frame.ll?rev=306927&r1=306926&r2=306927&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/CodeGen/ARM/execute-only-big-stack-frame.ll (original)<br>
+++ llvm/trunk/test/CodeGen/ARM/execute-only-big-stack-frame.ll Fri Jun 30 19:55:22 2017<br>
@@ -1,8 +1,8 @@<br>
-; RUN: llc < %s -mtriple=thumbv7m -arm-execute-only -O0 %s -o - \<br>
+; RUN: llc < %s -mtriple=thumbv7m -mattr=+execute-only -O0 %s -o - \<br>
; RUN: | FileCheck --check-prefix=CHECK-SUBW-ADDW %s<br>
-; RUN: llc < %s -mtriple=thumbv8m.base -arm-execute-only -O0 %s -o - \<br>
+; RUN: llc < %s -mtriple=thumbv8m.base -mattr=+execute-only -O0 %s -o - \<br>
; RUN: | FileCheck --check-prefix=CHECK-MOVW-MOVT-ADD %s<br>
-; RUN: llc < %s -mtriple=thumbv8m.main -arm-execute-only -O0 %s -o - \<br>
+; RUN: llc < %s -mtriple=thumbv8m.main -mattr=+execute-only -O0 %s -o - \<br>
; RUN: | FileCheck --check-prefix=CHECK-SUBW-ADDW %s<br>
<br>
define i8 @test_big_stack_frame() {<br>
<br>
Modified: llvm/trunk/test/CodeGen/ARM/execute-only-section.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/execute-only-section.ll?rev=306927&r1=306926&r2=306927&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/execute-only-section.ll?rev=306927&r1=306926&r2=306927&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/CodeGen/ARM/execute-only-section.ll (original)<br>
+++ llvm/trunk/test/CodeGen/ARM/execute-only-section.ll Fri Jun 30 19:55:22 2017<br>
@@ -1,6 +1,6 @@<br>
-; RUN: llc < %s -mtriple=thumbv7m -arm-execute-only %s -o - | FileCheck %s<br>
-; RUN: llc < %s -mtriple=thumbv8m.base -arm-execute-only %s -o - | FileCheck %s<br>
-; RUN: llc < %s -mtriple=thumbv8m.main -arm-execute-only %s -o - | FileCheck %s<br>
+; RUN: llc < %s -mtriple=thumbv7m -mattr=+execute-only %s -o - | FileCheck %s<br>
+; RUN: llc < %s -mtriple=thumbv8m.base -mattr=+execute-only %s -o - | FileCheck %s<br>
+; RUN: llc < %s -mtriple=thumbv8m.main -mattr=+execute-only %s -o - | FileCheck %s<br>
<br>
; CHECK: .section .text,"axy",%progbits,unique,0<br>
; CHECK-NOT: .section<br>
<br>
Modified: llvm/trunk/test/CodeGen/ARM/execute-only.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/execute-only.ll?rev=306927&r1=306926&r2=306927&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/execute-only.ll?rev=306927&r1=306926&r2=306927&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/CodeGen/ARM/execute-only.ll (original)<br>
+++ llvm/trunk/test/CodeGen/ARM/execute-only.ll Fri Jun 30 19:55:22 2017<br>
@@ -1,6 +1,6 @@<br>
-; RUN: llc -mtriple=thumbv8m.base-eabi -arm-execute-only %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CHECK-T2BASE %s<br>
-; RUN: llc -mtriple=thumbv7m-eabi -arm-execute-only %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CHECK-T2 %s<br>
-; RUN: llc -mtriple=thumbv8m.main-eabi -arm-execute-only %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CHECK-T2 %s<br>
+; RUN: llc -mtriple=thumbv8m.base-eabi -mattr=+execute-only %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CHECK-T2BASE %s<br>
+; RUN: llc -mtriple=thumbv7m-eabi -mattr=+execute-only %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CHECK-T2 %s<br>
+; RUN: llc -mtriple=thumbv8m.main-eabi -mattr=+execute-only %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CHECK-T2 %s<br>
<br>
@var = global i32 0<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</div>
</span></font></div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>