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: andi@complang.tuwien.ac.at (Andreas Krall) Subject: Re: FP exceptions on redhat 5.1 Date: 1998/09/16 Message-ID: <6totkh$7pj$1@news.tuwien.ac.at>#1/1 X-Deja-AN: 391773749 References: <35F9BAB0.5DDE@wizard.com> Content-Type: text/plain; charset=us-ascii Organization: Vienna University of Technology, Austria Mime-Version: 1.0 Newsgroups: comp.os.linux.alpha In article , Matt Grossman writes: > "H.W. Stockman" writes: > >> Isn't there a compiler switch to disable IEEE handling >> of denormals? Most alpha compilers make such a condition >> the default, since there alpha doesn't handle denormals >> in hardware. > > Yes, -mieee and friends. Do an "info gcc" and look under > Invoking GCC/Submodel Options options for further information. > I have the problem that these compiler options do not work under Linux(ALpha). I wrote the following small test program: void dotest(double a, double b) { printf("%f / %f = %f\n", a, b, a / b); } int main() { printf("trying to do division by zero in floating point\n"); dotest(0.0, 0.0); dotest(1.0, 0.0); dotest(-1.0, 0.0); return 0; } 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. I also tried a static linked version from Digital Unix under Linux and it didn't work, it throws an exception. This shows that the floating point trap handler is integrated into the OS and not linked to the program. The question now is, why does the IEEE arithmetic not work under Linux (Alpha, redhat 4.2). I need this info urgently to release the new version of our Java JIT compiler not only for Digital Unix but also for Linux. Andi -- andi@complang.tuwien.ac.at Andreas Krall http://www.complang.tuwien.ac.at/andi/ Inst. f. Computersprachen, TU Wien tel: (+431) 58801/18511 Argentinierstr. 8/4/1851 fax: (+431) 5057838 A-1040 Wien AUSTRIA EUROPE