From: Robert Harley <harley@corton.inria.fr>
Subject: Re: FP exceptions on redhat 5.1
Date: 1998/09/17 [thread overview]
Message-ID: <rz7sohrc8tb.fsf@corton.inria.fr> (raw)
In-Reply-To: 6totkh$7pj$1@news.tuwien.ac.at
andi@complang.tuwien.ac.at (Andreas Krall) writes:
> I have the problem that these compiler options do not work under
> Linux(ALpha). I wrote the following small test program:
>
>[...]
> I compiled this program using gcc with -mieee, egcs with -mieee and the
> Digital cc with -ieee. The programs works correct (printing NaN's and
> Inf's) under Digital Unix, but does not work under Linux. Under Linux
> it just throws an exception. [...]
The difference is that in Digital Unix, no traps are enabled by
default. Whereas on Linux, traps for invalid ops, division by zero
and overflow are enabled by default.
You should do something like this:
#include <asm/fpu.h>
extern unsigned long ieee_get_fp_control();
extern void ieee_set_fp_control(unsigned long fp_control);
ieee_set_fp_control( ieee_get_fp_control()
& ~IEEE_TRAP_ENABLE_INV
& ~IEEE_TRAP_ENABLE_DZE
& ~IEEE_TRAP_ENABLE_OVF
);
at the beginning of your thread...
>I need this info
> urgently to release the new version of our Java JIT compiler not only
> for Digital Unix but also for Linux.
A new version of Cacao? Send it my way!
Rob.
next prev parent reply other threads:[~1998-09-17 4:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-09-11 4:00 FP exceptions on redhat 5.1 Conrad Steenberg
1998-09-12 4:00 ` H.W. Stockman
1998-09-11 4:00 ` Matt Grossman
1998-09-12 4:00 ` Christian Hasse
1998-09-12 4:00 ` Michal Jaegermann
1998-09-13 4:00 ` Greg Lindahl
1998-09-16 4:00 ` Andreas Krall
1998-09-16 4:00 ` James D. Freels
1998-09-17 4:00 ` Robert Harley [this message]
1998-09-17 4:00 ` Andreas Krall
1998-09-17 4:00 ` Michal Jaegermann
1998-09-12 4:00 ` Conrad Steenberg
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox