[parisc-linux] Re: HPPA FPU Specification? (FE_INEXACT raised by accident)
Carlos O'Donell
carlos@baldric.uwo.ca
Mon, 20 Oct 2003 12:01:58 -0400
On Mon, Oct 20, 2003 at 11:30:34AM -0400, John David Anglin wrote:
> > > I suggest looking at page 10-7. It describes the PA 2.0 behavior
> > > for this situation. I'm not an IEEE so I don't know offhand what it
> > > mandates.
> >
> > Multiple exceptions per instruction is not the intended behaviour :)
> > I need two numbers, that when added only overflow, not overflow and
> > inexact. The same to be said for underflow. Perhaps I just need to
> > dig more.
>
> Well 10-7 talks explicitly about what happens when you get both
> exceptions on a single instruction. On the otherhand, the discussion
> of the inexact exception seems to imply that inexact should only occur
> in an overflow/underflow situation when an overflow/underflow exception
> doesn't occur. Possibly, the PA implementation is not consistent with
> IEEE mandated behavior, but I can't be sure.
My reading of 10-7 and the equivalent sections in the PA 1.1 arch
doc indicate that it _can_ happen outside of an overflow/underflow
situation. It just so happens that it can also be coupled with
underflow/overflow exceptions.
Does having them both at the same time violates the behaviour of
"feraiseexcept" in the ISO C standard (especially in the case of
underflow)? If feraiseexcept is called and only an underflow
requested, but underflow and inexact are enabled, what then?
c.