Subject: Re: Optimized kernel for PB520
To: Joe Laffey <joe@laffeycomputer.com>
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
List: port-mac68k
Date: 11/28/2004 20:31:42
At 12:31 Uhr -0600 28.11.2004, Joe Laffey wrote:
>I am trying to build a minimalist kernel for this 520c PB with 8mb (I
>know, buy more ram ;-)
>
>I was wondering....
>
>I should enable FPU_EMULATE, obviously, but what about FPSP?

Thanks for the question.  :)

Looking at 'info gcc' on a 2.0 machine, I see

`-m68040'
     Generate output for a 68040.  This is the default when the
     compiler is configured for 68040-based systems.

     This option inhibits the use of 68881/68882 instructions that have
     to be emulated by software on the 68040.  Use this option if your
     68040 does not have code to emulate those instructions.

which tells me that you want either -m68040 or FPSP (I should actually try
this out some time). Comments, anyone?

>Also, can I use -m68040 with -msoft-float ? I have them both in there now,
>but does -m68040 imply having an FPU?

Reading on in 'info gcc',

`-msoft-float'
     Generate output containing library calls for floating point.
     *Warning:* the requisite libraries are not available for all m68k
     targets.  Normally the facilities of the machine's usual C
     compiler are used, but this can't be done directly in
     cross-compilation.  You must make your own arrangements to provide
     suitable library functions for cross-compilation.  The embedded
     targets `m68k-*-aout' and `m68k-*-coff' do provide software
     floating point support.

should work just fine with -m68040.

>I thought it had more to do with some interger math operations that are
>handled with a single instruction in the 040 vs the 030 and earlier.

Probably both.

OTOH, I have a growing suspicion that gcc 3 has "issues" with optimisation
on "lesser targets", and that e.g. PR 26896 is the result of a kernel built
with -m68040.

But it's your machine - you try.  ;)

	hauke

--
/~\  The ASCII Ribbon Campaign
\ /    No HTML/RTF in email
 X     No Word docs in email
/ \  Respect for open standards