Moving floating point values around

Mike McNally m5 at lynx.UUCP
Tue Aug 23 03:45:50 AEST 1988


How naughty would it be for a compiler for the 386/387 (or 286/287 for that
matter) to move floating-point values with 386 MOV instructions instead
of FLD and FSTP?  It seems to me that as long as some degree of numerical
robustness (whatever that means) is maintained, the compiler should be
able to do this.  After all, C (for example) doesn't guarantee anything about
internal side-effects which take place during the transfer of a floating
point value from one place to another.  This is quite a savings in the case
of the 386/387 (about 60 clock cycles).

Do most compilers do this already, and if so should I assume that I am
working in a technological backwater?


-- 
Mike McNally of Lynx Real-Time Systems

uucp: lynx!m5 (maybe pyramid!voder!lynx!m5 if lynx is unknown)



More information about the Comp.lang.c mailing list