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

IEEE Floating Point on Alpha

Hash: SHA1

I did some more GCC hacking over the holidays and think I've got good news for 
everyone.  Here's the just of the latest Alpha GCC IEEE patch (which is even 
smaller than the original *grin*):

1)  Removes -mno-ieee.
2)  Causes the compiler to turn on -mieee if -ffinite-math-only has not been 

I don't believe that one should cause anyone any problems, as no actual gcc 
versions have been compiled with my previous patch (the patch I submitted was 
included but not enabled).

Two gives everyone what they want (the -ffast-math option turns on the 
- -ffinite-math-only option, so you won't get the -mieee slow down if you 
specify -ffast-math).

So, if you don't want support for NaNs or Infs (i.e. what -mieee enables) turn 
on -ffinite-math-only (or the larger subset -ffast-math).  I think this makes 
good sense, as the manual says -ffinite-math only "allow[s] optimizations for 
floating-point arithmetic that assume that arguments and results are not NaNs 
or +-Infs"

- -T

PS:  The best news is that, while debugging my patch, I discovered that 
- -ffast-math also causes crtfastmath.o to be linked into the resulting 
executable.  This code sets the FPU to map denormals and underflows to zero 
(i.e. code compiled with -ffast-math does not SIGFPE over denormals).

- -- 
 Tyson Whitehead  (-twhitehe@uwo.ca -- WSC-)
 Computer Engineer                        Dept. of Applied Mathematics,
 Graduate Student- Applied Mathematics    University of Western Ontario,
 GnuPG Key ID# 0x8A2AB5D8                 London, Ontario, Canada
Version: GnuPG v1.2.3 (GNU/Linux)


Reply to: