<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:echristo@gmail.com" title="Eric Christopher <echristo@gmail.com>"> <span class="fn">Eric Christopher</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Inline assembly, instruction order and register clobbering on Aarch64"
   href="https://llvm.org/bugs/show_bug.cgi?id=28098">bug 28098</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>echristo@gmail.com
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>INVALID
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Inline assembly, instruction order and register clobbering on Aarch64"
   href="https://llvm.org/bugs/show_bug.cgi?id=28098#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Inline assembly, instruction order and register clobbering on Aarch64"
   href="https://llvm.org/bugs/show_bug.cgi?id=28098">bug 28098</a>
              from <span class="vcard"><a class="email" href="mailto:echristo@gmail.com" title="Eric Christopher <echristo@gmail.com>"> <span class="fn">Eric Christopher</span></a>
</span></b>
        <pre>Hi Pavel,

As background, in general, inline asm is an opaque box to the optimizer and
code generator. This means that while "any blr instruction" could clobber x8,
the compiler doesn't parse and optimize your inline assembly to figure out what
you've done and the implications.

So I believe this is "works as intended" here. What's going on is that the call
to puts is clobbering the value in x8 and there's no clobber in the inline asm
statement so the compiler doesn't know that it's being clobbered there. The
inline asm is also not marked as volatile so the compiler feels free to move
things that aren't directly affected above the inline asm statement.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>