<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [AArch64] Decoder adrp comment incorrect"
   href="https://llvm.org/bugs/show_bug.cgi?id=26624">26624</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[AArch64] Decoder adrp comment incorrect
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.7
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>TableGen
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>njholcomb@wi.rr.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The decoder produces inaccurate comments when decoding the adrp instruction in
AArch64. Specifically, it incorrectly masks an immediate value instead of
shifting. The semantics of the adrp instruction require that the 21-bit
immediate value be shifted left by 12 bits to identify a page; however, the
comment written with the adrp instruction instead masks the bottom 12 bits.
Below is an example with the result from libopcodes as well.

Raw Bytes:
6c 7b 51 d0

LLVM decoding:
adrp x12, 667502 // 0xa2000

libopcodes decoding:
adrp x12, 0x00000000a2f6e000

The LLVM encoding has the correct constant value, but the comment about the
constant is incorrect.</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>