On Sun, Feb 21, 2010 at 9:15 AM, Geert Bosch <bo...@adacore.com> wrote:

>> As I understand it, whether -mfpmath=387 (with excess precision) or
>> -mfpmath=sse is the default is also considered part of the platform API
>> (like whether char is signed or unsigned by default, for example), in
>> addition to the ABI issues that can slow things down when SSE is used.
>
> No, this is not a new ABI. The ABI stays exactly the same. The I of
> ABI stands for Interface. That is, the ABI has nothing to say about
> how a function will compute any results. That is the area of language
> standards. The only way we'd violate the ABI is the reliance on SSE2
> instructions being available and SSE2 registers being saved by the OS.
>
> However, since any other compiler uses SSE2 instructions by default,
> I don't see why GCC should be any different. If anything, since the
> GCC target audience is more focused on Free and open source software,
> we could be more aggressive in taking advantage of newer hardware.
> What about an autoconf test for availability of 486 atomic instructions,
> and SSE2 instructions in order, and choosing the default target based
> on the host? Not too crazy, is it?
>

I agreed that gcc for x86 should choose a sensible default for 95% of
current x86 processors in use. People with those old processors can
use older gcc or -march=.

Default to SSE2 is a good first step.


-- 
H.J.

Reply via email to