Bug 42007 - Make -mfloat-gprs=double the default when compiling for powerpc-linux-gnuspe target
Summary: Make -mfloat-gprs=double the default when compiling for powerpc-linux-gnuspe ...
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: driver (show other bugs)
Version: 4.4.1
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-11 07:20 UTC by Alexander Dubov
Modified: 2009-11-12 15:09 UTC (History)
1 user (show)

See Also:
Host:
Target: powerpc-linux-gnuspe
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Dubov 2009-11-11 07:20:10 UTC
The problem applied both to building the compiler proper, as well as application on/for the given host triplet.

Most (all?) Freescale SPE enabled cores these days are dual-precision capable e500v2, and this is the case for couple of years now.

However, when building the compiler for the triplet in question, gcc internal libraries are only built with single precision SPE ops emitted. Making gcc to build these libraries with proper DP support requires setting of the *_FOR_TARGET variables during the build to contain "-mfloat-gprs=double".

Same applies for normal application compiles. Single precision FP instructions are used by default, unless the flag is set.

It seems beneficial and probably not harmful (e500v1 was never too popular and rather short-lived) to make -mfloat-gprs=double a default behavior.
Comment 1 Joseph S. Myers 2009-11-11 15:36:13 UTC
Changing the meaning of an existing target triplet is a bad idea.  Use
--enable-e500-double when configuring GCC if you want
-mfloat-gprs=double by default.
Comment 2 Alexander Dubov 2009-11-12 02:51:17 UTC
I understand that changing a triplet behavior is not a good idea.

However, it seems quite unfortunate, that important, performance affecting feature depends on obscure gcc configuration flag in situation where most existing and all future chips of this type provide the necessary functionality.
Comment 3 jsm-csl@polyomino.org.uk 2009-11-12 03:01:28 UTC
Subject: Re:  Make -mfloat-gprs=double the default when
 compiling for powerpc-linux-gnuspe target

Note that there are more than just e500 processors with the SPE 
functionality; for example, at least some e200 processors also support SPE 
with single-precision floating point only.

Comment 4 Alexander Dubov 2009-11-12 15:09:52 UTC
Indeed so.
I've read a roadmap for e200 just minutes after my previous post. :-)