[Bug target/56186] New: [4.8 regression] function return ABI change for 128-bit types on Win64
ebotcazou at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Feb 2 20:58:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56186
Bug #: 56186
Summary: [4.8 regression] function return ABI change for
128-bit types on Win64
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ebotcazou@gcc.gnu.org
Target: x86_64-*-mingw
Some 128-bit wide types are returned differently with 4.8 than with 4.7 because
of the introduction of MAX_FIXED_MODE_SIZE in the x86 back-end. For example:
struct S {
long long int l1, l2;
};
struct S foo (void)
{
struct S s = { 0, 0 };
return s;
}
with 4.7.x:
movq %rcx, 16(%rbp)
movq $0, -16(%rbp)
movq $0, -8(%rbp)
movq 16(%rbp), %rax
movq -16(%rbp), %rdx
movq %rdx, (%rax)
movq -8(%rbp), %rdx
movq %rdx, 8(%rax)
movq 16(%rbp), %rax
addq $16, %rsp
popq %rbp
ret
with 4.8.0:
movq $0, -16(%rbp)
movq $0, -8(%rbp)
movq -16(%rbp), %rax
movq -8(%rbp), %rdx
movq %rax, -32(%rbp)
movq %rdx, -24(%rbp)
movdqa -32(%rbp), %xmm0
addq $32, %rsp
popq %rbp
ret
The implementation in function_value_ms_64 is too fragile and only looks at
modes instead of looking at types first.
More information about the Gcc-bugs
mailing list