<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - [X86] Addresses with 32-bit index and no base register are misassembled in .code16gcc mode"
   href="https://bugs.llvm.org/show_bug.cgi?id=46866">46866</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[X86] Addresses with 32-bit index and no base register are misassembled in .code16gcc mode
          </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>Windows NT
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </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>craig.topper@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>craig.topper@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, spatel+llvm@rotateright.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>.code16gcc mode is a mode where the processor is in 16-bit mode but the
assembly is written using 32-bit registers. As such we are supposed to use 0x67
and 0x66 prefixes to make the processor reference 32-bit register.

If the address lacks a base register we just look at the displacement to
determine if we can use a 16-bit address mode without 0x67 or if we need to use
0x67 to switch to a 32-bit mode address. In true 16-bit address parsing we
never allow the index to be filled in without the base. But if we have a 32-bit
address we are allowed to have a 32-bit index and no base.</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>