<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 --- - __m64 not passed according to x86-64 ABI"
   href="https://llvm.org/bugs/show_bug.cgi?id=26832">26832</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>__m64 not passed according to x86-64 ABI
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>jyknight@google.com
          </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>Test program:

#include <mmintrin.h>
__m64 glob;
void xxxx(__m64 x) {
  glob = x;
}

psABI says "Arguments of types float, double, _Decimal32, _Decimal64 and __m64
are in class SSE." That's pretty clear.

GCC, at least from 4.4.7 through 6 (the versions available at gcc.godbolt.org),
follows the psABI:
        movq    %xmm0, glob(%rip)
        ret

Clang does not:
        movq    %rdi, glob(%rip)
        retq


Clang claims it's doing so for gcc compatibility in a comment:
      // gcc passes <1 x double> in memory. :(
      // gcc passes <1 x long long> as INTEGER.

but that's not actually true (now; don't know about when the comment was
written)</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>