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

Re: [MiNT] SV: Some mintlib patches



Henk Robbers wrote:
In my opinion it is not such a good idee to link the
floating point capabilities to the processor type.
A compiler should generate entirely software or entirely
line F for floating point.

GCC is fully configurable when compiling programs.
The CPU type can be set with the options like:
-m68000
-m68030
-m68060

The floating point model can be specified, too:
-msoft-float # Do not use Line-F for float operations
-m68881 # Use Line-F for float operations

By default, the options used are -m68000 and -msoft-float
You can add manually -m68000 -m68881 in order to generate code for a 68000 with a math coprocessor (or an emulated one)

The option -m68020-60 generates code which will be correct (but not optimal) for CPU from 68020 to 68060, and using the Line-F. If the option -msoft-float is specified, the Line-F will not be used.

When so much work is put in GCC for atari_mint,
it might be an idee to create a --line_F option in GCC.

This option is -m68881

GCC is very flexible, anyone can compile a program for any CPU/FPU variant.

However, the problem discussed here is about libraries. All the libraries linked with a program must have been compiled with the same options (or compatible options).

When someone provides a library in binary form, he can't provide a binary for every possible combination of the GCC options.

So we have to choose some reasonable standard option sets for the MiNT platform. Currently, they are :
(nothing): same as -m68000 -msoft-float
-m68020-60: (using implicitly -m68881)

Any library writer should provide these 2 versions.
The question is if we should add a new standard option set with -m68060, specifically optimized for that CPU. In that case, it will be additional work for the library writers.

--
Vincent Rivière