This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/29337] -mfpmath=387 doesn't use fistp for double-to-integer conversion
- From: "uros at kss-loka dot si" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Oct 2006 07:08:56 -0000
- Subject: [Bug target/29337] -mfpmath=387 doesn't use fistp for double-to-integer conversion
- References: <bug-29337-12811@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from uros at kss-loka dot si 2006-10-05 07:08 -------
> try -O2 -msse2, you get:
> _Z8todoubledd:
> subl $12, %esp
> fldl 24(%esp)
> faddl 16(%esp)
> fstpl (%esp)
> movsd (%esp), %xmm0
> addl $12, %esp
> cvttsd2si %xmm0, %eax
> ret
>
>
> Though I think the movsd should not be there but that is a different
> issue.
This is PR 19398. I have a patch that adds a bunch of peephole2 patterns to
address this particular issue. The patch is already approved and waits for
stage1.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29337