<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 - m[ft]ppr instruction aliases not implemented"
   href="https://bugs.llvm.org/show_bug.cgi?id=44264">44264</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>m[ft]ppr instruction aliases not implemented
          </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: PowerPC
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>colin.samples@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, nemanja.i.ibm@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=22924" name="attach_22924" title="patch to implement aliases">attachment 22924</a> <a href="attachment.cgi?id=22924&action=edit" title="patch to implement aliases">[details]</a></span>
patch to implement aliases

The mfppr and mtppr instruction aliases are not implemented in LLVM, but they
are in GCC and xlC. m[ft]ppr32 and quite a number of other m[tf]spr aliases are
also not implemented in LLVM.

I stumbled across this when trying to use the `_mm_pause` function
`clang/lib/Headers/ppc_wrappers/xmmintrin.h`, which uses these instructions in
its implementation.

The attached patch adds the instructions. AFAICT, the PPR was introduced in
POWER6, so this patch checks for that, although it seems like a bit much just
to implement an instruction alias.

Another option would be to just change the implementation in `xmmintrin.h` to
use `mfspr Rx,896`. Thoughts?</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>