Subject: Re: sparc/sparc64 gcc CFLAGS for optimization
To: David Brownlee <abs@netbsd.org>
From: Todd Vierling <tv@wasabisystems.com>
List: port-sparc64
Date: 11/27/2001 16:32:37
On Tue, 27 Nov 2001, David Brownlee wrote:

: > **** These options are deprecated and will be deleted in GNU CC 2.9. They
: > have been replaced with -mcpu=xxx. ****

: > If that's the case, I suppose that will cause problems if EGCS is ever
: > replaced by straigh GCC 3?
: >
: 	I'd tend to suggest cpuflags which outputs -mcpu=supersparc for
: 	gcc 2.90 and later and -msupersparc for earlier compilers
: 	automatically :)

Actually, since *we* control the specs entries for NetBSD, we can keep these
around indefinitely for NetBSD/sparc.

I haven't checked on this one, but a lot of annotations like this in the
.info file say that things will be deleted in 2.9, but 2.95 still has such
features....

=====

Note that as far as mul/div goes for sparc, we really should have libc stubs
(sort of like how libm_i387 works on i386) that replace the long
v7-compatible libcalls with quick v8-instruction ones based on the system
type.  This can be configured to happen in ld.so.conf.  The overhead of the
function call should be minimal, since a quick multiply or divide on v8+
would not need a save/restore of the register window.

(Kernels, of course, can be optimized on their own, since kernels are simply
standalone programs.)

-- 
-- Todd Vierling <tv@wasabisystems.com>  *  Wasabi & NetBSD:  Run with it.
-- CDs, Integration, Embedding, Support -- http://www.wasabisystems.com/