public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/56186] New: [4.8 regression] function return ABI change for 128-bit types on Win64
@ 2013-02-02 20:58 ebotcazou at gcc dot gnu.org
  2013-02-04  9:52 ` [Bug target/56186] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2013-02-02 20:58 UTC (permalink / raw)
  To: gcc-bugs


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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-02-04 16:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-02 20:58 [Bug target/56186] New: [4.8 regression] function return ABI change for 128-bit types on Win64 ebotcazou at gcc dot gnu.org
2013-02-04  9:52 ` [Bug target/56186] " rguenth at gcc dot gnu.org
2013-02-04 13:37 ` ktietz at gcc dot gnu.org
2013-02-04 16:38 ` ktietz at gcc dot gnu.org
2013-02-04 16:40 ` ktietz at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).