This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Default x86-darwin to -mfpmath=sse, and update -arch settings



On 12/04/2005, at 4:17 AM, Richard Guenther wrote:
On Apr 12, 2005 12:38 PM, Richard Henderson <rth@redhat.com> wrote:
On Mon, Apr 11, 2005 at 06:44:27PM -0700, Geoffrey Keating wrote:
- It merges in a patch from Apple's tree to use 'i386' for -arch
instead of 'i686'. (The people responsible for the previous setting
changed their mind.)


- It makes darwin use SSE fpmath by default.  I've made this a
  convenient macro because I expect that other platforms might want
  this in the future.

I don't see how these work together. Seems to me you'd want ...


These have a common motivation, which is that Darwin only runs on a
pentium-m and higher, and earlier chips are not really supported.

-march=pentium-m as the default then. Since it would appear that you're not actually enabling SSE, and thus -mfpmath=sse.

Or are you just expecting folks to configure --with-arch?

At the moment, I'm expecting --with-arch, but am thinking of ways to avoid that.


What I was thinking of was adding a TARGET_ARCH_DEFAULT macro, but there's a problem: if you just configure i686-apple-darwin, you get -mtune=pentiumpro, not what you want; if you configure i386-apple-darwin, you get a libstdc++ with 386 locking, also not what you want; and config.sub says that pentium_m-apple-darwin is not a valid configure triplet and it seems weird to require that anyway.

Also, without an associated ABI change, the performance impact of
fpmath=sse is not always positive, even so with the lost x87 intrinsics
without appropriate replacements with tuned SSE/SSE2 code, like
the intel compiler provides.

I understand that the purpose of the fpmath setting is not so much for performance, but that the libm really wants proper IEEE semantics (due to it being mostly intended for ppc); but I'll ask, maybe someone is confused. It'd be nice if it had good performance too, of course, or at least as good as fpmath=387.


(If you wanted best performance, I think you'd want to use -mfpmath=sse,387 right?)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]