Subject: re: sparc/sparc64 gcc CFLAGS for optimization
To: matthew green <mrg@eterna.com.au>
From: Todd Vierling <tv@wasabisystems.com>
List: port-sparc64
Date: 11/27/2001 22:03:54
On Wed, 28 Nov 2001, matthew green wrote:
: 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.
:
: libc stubs? you'd need an entirely different libc i believe.
: the int mul/div insns will be used all over libc.
No, I meant to provide an alternate .umul, .udiv, etc. in a libc_v8.so,
loaded by ld.elf_so after detecting the v8+ processor. You don't need a
whole new libc, just weak symbols in the main one to allow the overlay
library to do its work.
This way all dynamically linked programs can leverage the speed without
having to recompile with a special compiler option -- thus allowing the same
binaries still to work on v7.
--
-- Todd Vierling <tv@wasabisystems.com> * Wasabi & NetBSD: Run with it.
-- CDs, Integration, Embedding, Support -- http://www.wasabisystems.com/