<html>
    <head>
      <base href="http://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 --- - LLVMOpInfoCallback GetOpInfo not setting correct insn->displacementSize"
   href="http://llvm.org/bugs/show_bug.cgi?id=17310">17310</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LLVMOpInfoCallback GetOpInfo  not setting correct insn->displacementSize
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </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>Backend: X86
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>James.Dutton@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=11250" name="attach_11250" title="PATCH to fix the problem.">attachment 11250</a> <a href="attachment.cgi?id=11250&action=edit" title="PATCH to fix the problem.">[details]</a></span>
PATCH to fix the problem.

I am looking at the "LLVMOpInfoCallback GetOpInfo" callback.

Example 1 GOOD:
41 c6 84 24 16 04 00 00 0c :      movb    $12, 1046(%r12)

Makes calls to the callback with:
Offset = 0x4, Size = 0x4 <- Octets: 16 04 00 00
Offset = 0x8, Size = 0x1 <- Octets: 0c
That was correct.

Example 2 BAD:
c7 45 98 a1 ff ff ff :    movl    $4294967201, -104(%rbp)
Makes calls to the callback with:
Offset = 0x2, Size = 0x4 <- Octets: 98 a1 ff ff
Offset = 0x3, Size = 0x4 <- Octets: a1 ff ff ff
That is wrong.
The callbacks should be:
Offset = 0x2, Size = 0x1   <- Octets: 98
Offset = 0x3, Size = 0x4   <- Octets: a1 ff ff ff</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>