[llvm-bugs] [Bug 26832] New: __m64 not passed according to x86-64 ABI

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 3 11:30:48 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26832

            Bug ID: 26832
           Summary: __m64 not passed according to x86-64 ABI
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jyknight at google.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

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)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160303/9e953abd/attachment.html>


More information about the llvm-bugs mailing list