This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: 68020-68040 bin (in)compatibility...?



>From "Vitor M. F. Santos" <vitor@ua.pt>:

> The question is, how can I assure that code compiled
> for a 68020+68881 platform will run without any problems
> on a 68040 platform? Must I avoid the use of trigonometric
> functions only, or is it more than that?

Vitor, you must use the 68040 FSPP software package from Mororola to do this.
The floating point instructions of the 68881/2 which are not implemented by
this processor cause an exception; the FSPP package catches the exception and
emulates the instruction in software. Once installed, the FSPP is transparent.

You can get the FSPP from the Motorola FTP site.

I havn't used it myself, so I can't offer any further advice. Can anyone 
offer a procedure for installing this package? How does it relate to the
math library of Newlib? Can it be massaged into a higher performance form
of libm.a for 68040s?

An alternative is to compile with -msoft-float, which will prevent gcc
emitting any floating-point instructions at all.

Robin Kirkham			CSIRO Division of Manufacturing Technology
Project Engineer		Locked Bag 9, Preston 3072, Australia
robin.kirkham@mlb.dmt.csiro.au	Phone: +61 3 9662-7756  Fax: +61 3 9662-7853