<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 - invalid instruction when using ldrht/ldrsht/ldrsbt without immediate offset"
   href="https://bugs.llvm.org/show_bug.cgi?id=45070">45070</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>invalid instruction when using ldrht/ldrsht/ldrsbt without immediate offset
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Backend: ARM
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>stefan@agner.ch
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, smithp352@googlemail.com, Ties.Stuij@arm.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Trying to assemble these instructions without offset (which is optional
according to the ARM ARM) leads to invalid instruction:

        .syntax unified
        .text
        .arch   armv6t2
        .arm
        ldrht r5, [r4]

Building with:

$ llvm-mc --triple=armv6t2-linux-gnueabihf repr-armv6t2.S 
        .text
        .arch   armv6t2

        .code   32
repr-armv6t2.S:5:2: error: invalid instruction, any one of the following would
fix this:
        ldrht r5, [r4]
        ^
repr-armv6t2.S:5:16: note: too few operands for instruction
        ldrht r5, [r4]
                      ^
repr-armv6t2.S:5:2: note: instruction requires: thumb2
        ldrht r5, [r4]
        ^


This appeared when trying to build Linux with Clang's integrated assembler:
<a href="https://github.com/ClangBuiltLinux/linux/issues/909">https://github.com/ClangBuiltLinux/linux/issues/909</a></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>