Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
* Floating exceptions on Compaq XP1000 ev6
@ 1999-10-26  4:00 Carl B. Quillen
  1999-10-26  4:00 ` Janne Sinkkonen
  0 siblings, 1 reply; 2+ messages in thread
From: Carl B. Quillen @ 1999-10-26  4:00 UTC (permalink / raw)


Hi.  I'm running Redhat 6.0 with a 2.2.12 kernel on a Compaq XP1000,
and there doesn't seem to be any way to turn off floating point exceptions.
The machine runs by default with them all turned on (except maybe
underflow).  Playing around with the osf_getsysinfo() and osf_setsysinfo()
system calls, the machine claims that it is running int the default IEEE
mode (with everything off).  But that's not what happens in practice.
I can change the reported state with osf_setsysinfo(), but not the behavior.

Anyone know what's going on?

Thanks,

Carl Quillen (cbq@shore.net)




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Floating exceptions on Compaq XP1000 ev6
  1999-10-26  4:00 Floating exceptions on Compaq XP1000 ev6 Carl B. Quillen
@ 1999-10-26  4:00 ` Janne Sinkkonen
  0 siblings, 0 replies; 2+ messages in thread
From: Janne Sinkkonen @ 1999-10-26  4:00 UTC (permalink / raw)


"Carl B. Quillen" <cbq@shore.net> writes:

> Hi.  I'm running Redhat 6.0 with a 2.2.12 kernel on a Compaq XP1000,
> and there doesn't seem to be any way to turn off floating point
> exceptions.  The machine runs by default with them all turned on
> (except maybe underflow).  Playing around with the osf_getsysinfo()
> and osf_setsysinfo() system calls, the machine claims that it is
> running int the default IEEE mode (with everything off).  But that's
> not what happens in practice.  I can change the reported state with
> osf_setsysinfo(), but not the behavior.
> 
> Anyone know what's going on?

I'm in no way an expert in this (experts, please correct me if I'm
wrong), but as a person who has 'been there': 

Maybe the exceptions can be turned off, maybe not, but without
exceptions you need to use IEEE floating points, for otherwise you can
get silently wrong results. Alpha doesn't directly support IEEE in the
sense that an instruction would produce NaN or some such. Instead,
kind of software emulation is used. You can turn it on at the compile
time, for example with the -mieee option of gcc, but that kills
performance (especially with gcc?), because the compiler puts trap
instructions here and there, in the worst case after every floating
point operation. Each trap waits for the pipelines to become
empty. So, IEEE floating points and Alpha really doesn't fit well
together.

The best option would be to write code which does not generate
exceptions, or, if you already has code too cumbersome to modify,
compile only the problematic files with IEEE floats turned on.

I have a feeling that you can also get floating point exceptions by
reading floats from a text file produced by a Pentium (for
example). Maybe that's because of the non-normalized floats which have
zeros at the beginning of the mantissa (they are too small to be
represented in the normalized form.

Hopefully this helps,

-- 
Janne



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-10-26  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-10-26  4:00 Floating exceptions on Compaq XP1000 ev6 Carl B. Quillen
1999-10-26  4:00 ` Janne Sinkkonen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox