From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18524 invoked by alias); 2 Feb 2013 20:58:44 -0000 Received: (qmail 18360 invoked by uid 48); 2 Feb 2013 20:58:27 -0000 From: "ebotcazou at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/56186] New: [4.8 regression] function return ABI change for 128-bit types on Win64 Date: Sat, 02 Feb 2013 20:58:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: ebotcazou at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-02/txt/msg00152.txt.bz2 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.