<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 - PowerPC: inline assembly doesn't know the difference between altivec and vsx registers"
   href="https://bugs.llvm.org/show_bug.cgi?id=42469">42469</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>PowerPC: inline assembly doesn't know the difference between altivec and vsx registers
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>8.0
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>slandden@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>AltiVec registers are differn't registers from VSX registers, and even when the
VSX register class ("wa"[1]) is specified to an inline assembly, gcc doesn't
put the variable in the right register

#include <altivec.h>
#include <stdint.h>
void store_unaligned(vector unsigned char vec, unsigned char *dest) {
uintptr_t zero = 0;

    __asm__ volatile ("stxvb16x %0, %1, %2\n\t"
      :
      : "wa" (vec), "r" (zero), "r" ((uintptr_t)dest));
}

compiled with clang -mvsx unaligned.c --save-temps -c -O3

store_unaligned:                        # @store_unaligned
.Lfunc_begin0:
# %bb.0:
        li 3, 0
        #APP
        stxvb16x 2, 3, 5 <=== clang needs to move it from vr3 to vs2, but
didn't</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>