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: unassignedclangb...@nondot.org
          Reporter: jykni...@google.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to