<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 - armv7 neon inline assembly parameter passing results in invalid assembly"
   href="https://bugs.llvm.org/show_bug.cgi?id=48797">48797</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>armv7 neon inline assembly parameter passing results in invalid assembly
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>11.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>bero@lindev.ch
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=24397" name="attach_24397" title="test case">attachment 24397</a> <a href="attachment.cgi?id=24397&action=edit" title="test case">[details]</a></span>
test case

Building the following test code (also attached):

#include <arm_neon.h>

void test() {
    int32x4_t sv0;
    int x;

    __asm__ __volatile__ (
        "vld1.s32 %h[sv0], [%[lin0]]"
        : [sv0] "=w" (sv0)
        : [lin0] "r" (x)
        :
    );
}

on armv7hnl with clang results in a blank first parameter to vld1.s32:

$ clang -mfpu=neon-vfpv4 -o test.o -c test.c 
test.c:9:9: error: invalid operand in inline asm: 'vld1.s32 ${0:h}, [$1]'
        "vld1.s32 %h[sv0], [%[lin0]]"
        ^
test.c:9:9: error: unexpected token in operand
<inline asm>:1:11: note: instantiated into assembly here
        vld1.s32 , [r0]
                 ^
2 errors generated.

Building the same code with gcc works as expected.:

$ gcc -mfpu=neon-vfpv4 -o test.o -c test.c
$ objdump -D test.o
[...]
00000000 <test>:
   0:   f84d 7d04       str.w   r7, [sp, #-4]!
   4:   b087            sub     sp, #28
   6:   af00            add     r7, sp, #0
   8:   697b            ldr     r3, [r7, #20]
   a:   f963 0a8f       vld1.32 {d16-d17}, [r3]
   e:   f947 0adf       vst1.64 {d16-d17}, [r7 :64]
  12:   bf00            nop
  14:   f107 071c       add.w   r7, r7, #28
  18:   46bd            mov     sp, r7
  1a:   f85d 7b04       ldr.w   r7, [sp], #4
  1e:   4770            bx      lr
[...]


The code is extracted from pulseaudio 14.2.</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>