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: "pinskia at physics dot uc dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Oct 2006 05:05:43 -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 #7 from pinskia at physics dot uc dot edu 2006-10-05 05:05 -------
Subject: Re: -mfpmath=387 doesn't use fistp for
double-to-integer conversion
On Thu, 2006-10-05 at 05:00 +0000, seongbae dot park at gmail dot com
wrote:
> With 4.1.0 i686-unknown-linux-gnu target:
>
> # gcc -O2 m.c -S
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.
-- Pinski
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29337