Subject: Re: Sun 3/50 and -current
To: Frederick Bruckman <fredb@immanent.net>
From: Todd Vierling <tv@wasabisystems.com>
List: tech-perform
Date: 03/27/2002 14:45:28
On Wed, 27 Mar 2002, Frederick Bruckman wrote:

: We do, on m68k. Actually, we seem to be currently building
: for *only* 68020 -- "-m68020", and not "-m68020-40" as I said
: before. The compiled code won't necessarily work on 68040...

Well, it should work, so long as the trap-based emulation of the missing
insns works.  If emulation doesn't work....  8-)

: The default target is defined in "gnu/usr.bin/gcc/arch/m68k/tm.h"
: as 'MASK_68020|MASK_68881|MASK_BITFIELD'.

Well, the appropriate place to change it is in
src/gnu/dist/toolchain/gcc/config, so that mknative will pull this out
automatically.  However,

: I believe that should be '|MASK_68040'?

Yes, that is the correct way to switch to -m68040-20.  (-m68040 also adds
MASK_68040_ONLY, which starts to use the new opcodes not on the '020.)

The performance hit of *this* change shouldn't be earth-shattering, and I
would support adding it by default.  However, I don't know that the same
could/should be said for -m68020-60, even though that option is critically
needed for 68060 users.

(The use of -m68020-60 drops use of the 64-bit mul/div operations, reducing
them to libc calls.  The problem here is that the emulation is very slow.
However, the same technique I mentioned for speeding up mul/div on V8 SPARC,
using a libc overlay, could be leveraged here.)

: > if we did that, what would the sun2 (68010) users do?  ;)
:
: They get a different compiler and different binaries.

Right.  The sun2 config is in a completely different file.

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