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

            Bug ID: 46320
           Summary: __int128 not aligned to 16-byte boundary
           Product: new-bugs
           Version: 10.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Keywords: miscompilation
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

Consider this program:

int main(void) {
    __int128 x = 0;
    __asm__ __volatile__(
        "movdqa  %%xmm3, %0"
        : 
        : "xm"(x)
        : "xmm3"
    );
}

When I compile it with "clang -O3" on x86-64 and run it, it segfaults. The
problem is that it put x at address 0x402008, which is only 8-byte aligned,
even though the System V ABI requires that __int128's be 16-byte aligned, which
"movdqa" depends on.

https://godbolt.org/z/kMJnSd

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to