https://bugs.llvm.org/show_bug.cgi?id=34646
Bug ID: 34646
Summary: LLVM does not correctly align __int128 parameters
passed on the stack
Product: new-bugs
Version: 5.0
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedb...@nondot.org
Reporter: js-llvm-bugzi...@webkeks.org
CC: llvm-bugs@lists.llvm.org
Quoting from the x86_64 ABI:
Arguments of type __int128 offer the same operations as INTEGERs,
yet they do not fit into one general purpose register but require two
registers. For classification purposes __int128 is treated as if it
were implemented as:
typedef struct {
long low, high;
} __int128;
with the exception that arguments of type __int128 that are
stored in memory must be aligned on a 16-byte boundary.
However, Clang does not align them on a 16-byte boundary.
This results in Clang using a different ABI than GCC and others, resulting in
incompatible code.
E.g. the following code will create a function with a different ABI when
compiled with Clang and GCC:
__int128
test(__int128 a, __int128 b, __int128 c, __int128 d)
{
return a + b + c +d;
}
--
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