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

Re: manipulating FPU rounding modes on alpha

> > I also see an indication that if you call gcc with the -mieee option, it
> > will generate code that runs on any alpha correctly, without relying on
> > the kernel to solve the problem for it.
> Your conclusion seems wrong since the test is built with "-mieee
> -mfp-rounding-mode=d -frounding-math".

As far as my understanding goes, this is not how the kernel module and -mieee 
work.  I understand the difference in code generated with -mieee is that the 
ASM is produced in such a way that precise exceptions handling can be done.

Precise exception handling is necessary for the kernel to be able to restart 
code after an exception/trap occurs.  Without it, the kernel has to kill any 
program once a math fixup trap occurs (as it will when any such things as 
infs, nans, etc., that are not supported in hardware, are encountered).

The difference in having the module load/not loaded is when precise exception 
handling is in effect (i.e., -mieee) and a trap occurs.  Without the module 
the kernel just zeros the result and continues.  With the module it generates 
the proper IEEE result and continues.

Note this does not apply to anything after the EV56 as they have both (I 
believe it is both, but it may also be just one or the other) precise 
exceptions in all cases and hardware support for full IEEE specification.

Later!  -Tyson

PS:  The debian default is -mieee on unless --ffinte-math-only (part 
of -ffast-math) is specified (this was not the original default and getting 
it this way was the solution to a lot of pain in the form of random SIGFPEs).

 Tyson Whitehead  (-twhitehe at uwo.ca -- MC-)
 Computer Engineer                          Dept. of Applied Mathematics,
 Graduate Student- Applied Mathematics      University of Western Ontario,
 GnuPG Key ID# 0xF7666BFF                   London, Ontario, Canada

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply to: