From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,84278579ba085c08 X-Google-Attributes: gid111c93,public From: Robert Harley Subject: Re: FP exceptions on redhat 5.1 Date: 1998/09/17 Message-ID: #1/1 X-Deja-AN: 392008411 Content-Transfer-Encoding: 8bit References: <35F9BAB0.5DDE@wizard.com> <6totkh$7pj$1@news.tuwien.ac.at> Content-Type: text/plain; charset=iso-8859-1 Organization: I.N.R.I.A Rocquencourt Mime-Version: 1.0 Newsgroups: comp.os.linux.alpha 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 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.