<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 --- - integrated assembler has poor diagnostics"
   href="https://llvm.org/bugs/show_bug.cgi?id=25720">25720</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>integrated assembler has poor diagnostics
          </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: ARM
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>nicolasweber@gmx.de
          </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>When trying to build boringssl with clang's integrated assembler, it complains
about this:

thakis@thakis:~/src/chrome/src$ cat arm.S
.fpu neon
.text
.align 4
.global foo
.hidden foo
.type foo, %function
and sp, sp, #0xffffffe0
thakis@thakis:~/src/chrome/src$
third_party/llvm-build/Release+Asserts/bin/clang -c arm.S -march=armv7-a 
-target arm-linux-androideab
arm.S:7:14: error: invalid operand for instruction
and sp, sp, #0xffffffe0
             ^


gas accepts this without complaints and converts it into a BIC instruction (a
and not b), as ~0xffffffe0 = 1f fits into the 8bit unshifted immediate.  The
integrated assembler should do this too:


thakis@thakis:~/src/chrome/src$
third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc
-c arm.S
thakis@thakis:~/src/chrome/src$
third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-objdump
-D -marm arm.o 

arm.o:     file format elf32-littlearm


Disassembly of section .text:

00000000 <.text>:
   0:    e3cdd01f     bic    sp, sp, #31
   4:    e1a00000     nop            ; (mov r0, r0)
   8:    e1a00000     nop            ; (mov r0, r0)
   c:    e1a00000     nop            ; (mov r0, r0)</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>