Port-amiga archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How to cross compile optimized for Amiga with 68060?



On Sat, Jan 03, 2009 at 01:52:43PM +0100, Leonard Schmidt wrote:
> As for me, netbsd is running better now than with the standard 030
> binaries and I'm not really worried about the remaining fpiemu hits.
> I was just curious if I could produce a netbsd for the 060 only and 
> omit the M060SP software support from the kernel.

You can do that as an experiment, but be sure to use that kernel
*only* as a secondary, so that a crashing system (remember :
/sbin/init and /bin/sh have to run correctly - including /lib/libc.so!)
won't leave you without access!

Then, all applications that still use FP instructions not implemented
in hardware will crash, and using gdb you might be able to find out 
what exactly is causing the FPIEMU traps.

Note also, that some FPU operations *need* fixup by kernel trap
code (e.g., de/un-normalized numbers), also some special integer
instructions like unaligned CAS, and all of CAS2, and the move
into/from every other byte trap into the kernel (but the compiler
doesn't create them, you might have assembler code somehwere!).

So for production use, you'd have to split the option up into 
several ones.

As for the FPU stuff: Neither 68040 nor 68060 have a lot of the stuff
that's in libm - transcendental functions etc. 

Btw, a few years ago I've experimented with building an libm that's
68060 specific and uses Motorola's userland emulation library for
them. After a lot of work, I got a system that runs and is slower
than the kernel-trapping version that uses Motorola's kernel trap
library. I think that happens because the 68060 (like all Motorola
MMU's) uses physical address tagging, so the kernel trap library
always uses the same cache places, while the userland library will
be at different addresses between applications, thus creating more
cache loading events.

Regards,
        -is


Home | Main Index | Thread Index | Old Index