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

Re: [MiNT] GCC Fast Math



Thomas Jürges wrote:


But it is the proper way.  An unimplemented coprocessor instruction,
e.g. fsin, will trap exception #11 "Unimplemented Instruction Exception"
(M68060 User's Manual, chapter 6.5 Floating Point Exceptions, pp. 6-19)
which will be taken care of the - hopefully - installed M68060SP: "The
M68060SP emulates the unimplemented floating-point instruction in
software, maintaining user-object-code compatibility."  Meaning that it
does not matter if -ffast-math or -m68060 or -m68881 is used.  The FPU
emulation takes place at the exception level and is completely detached
from the software executing an FPU instruction.  The software has - only
by monitoring the execution time - no real knowledge if the FPU
instruction was executed in hardware (FPU) or by the M68060SP.

Well stated.

My interpretation:
- - M68060SP should always be installed on M68060 systems.
- - Compilers compiling for M68060 should always generated FPU
instructions, nothing else.

I totally agree.

Thanks to emulation thru line_F vector I didnt have to bother
whether my math programs ran on my TT or on my Milan.

It is the instruction set that matters and that is propagated
thru the CPU incarnations.

Unimplemented instructions have been performed by exception
processing (aka 'extracode') for ages on almost all platforms.

The more complex math instructions on 68040/60 are left out
to save chip space and because the 68040/60 are already many
times faster than the 68020/30.

Mote that the FPSP uses the already faster basic h/w math
instructions.

--
Groeten; Regards.
Henk Robbers. http://members.chello.nl/h.robbers
Interactive disassembler: TT-Digger;  http://digger.atari.org
A Home Cooked C compiler:      AHCC;  http://ahcc.atari.org