This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/81516] Wrong code with -m32 -O2 on x86_64-linux-gnu


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81516

--- Comment #6 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to mednafen from comment #2)
> Created attachment 41811 [details]
> alternate, further reduced test case

Works OK for me with:

-O2 -m32 -march=i686 -msse2 -mfpmath=387

a:
        subl    $20, %esp
        fildl   24(%esp)
        cmpl    $10, 24(%esp)
        fstpl   (%esp)
        movq    (%esp), %xmm0
        movsd   (%esp), %xmm1
        movq    %xmm0, 8(%esp)
        movsd   %xmm1, b
        jg      .L1
        xorl    %eax, %eax
        movl    %eax, 12(%esp)
        movsd   8(%esp), %xmm2
        movsd   %xmm2, (%esp)
.L1:
        fldl    (%esp)
        addl    $20, %esp
        ret

        .ident  "GCC: (GNU) 7.1.1 20170718 [gcc-7-branch revision 250314]"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]