This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: -mfpmath=387 flag does not prevent gcc from using SSE/SSE2instructions
- From: Andreas Jaeger <aj at suse dot de>
- To: Andrew Derrick Balsa <andrebalsa at mailingaddress dot org>
- Cc: gcc-bugs at gcc dot gnu dot org, Andi Kleen <ak at suse dot de>,Jan Hubicka <jh at suse dot cz>
- Date: Fri, 02 May 2003 07:05:30 +0200
- Subject: Re: -mfpmath=387 flag does not prevent gcc from using SSE/SSE2instructions
- References: <200305020714.50606.andrebalsa@mailingaddress.org>
Andrew Derrick Balsa <andrebalsa@mailingaddress.org> writes:
> Hi,
>
> gcc-3.2.3, glibc 2.3.1, binutils 2.13.2.1, target is x86_64
>
> Even with -mfpmath=387 flag, compiler generates CVTSI2SD_VsdEd (SSE2
> instruction), probably while compiling the following source:
>
> ...
> printf("%-20s %9ld %9ld %9ld %3ld%% %s\n",
> device,
> (long) (s.f_blocks * (s.f_bsize /
> (double)KILOBYTE)),
> (long) ((s.f_blocks -
> s.f_bfree)*(s.f_bsize/(double)KILOBYT
> (long) (s.f_bavail * (s.f_bsize /
> (double)KILOBYTE)),
> blocks_percent_used, mount_point);
> ...
>
> I thought the behaviour would be not to generate any SSE/SSE2 instruction with
> this flag. Am I wrong, or could this be a (small) bug?
I think -mfpmath should be disabled on x86-64. Honza, what do you
think? You would break the ABI otherwise,
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj