From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 1963 invoked from network); 24 Jun 1998 18:12:42 -0000 Received: from beezer.med.miami.edu (root@129.171.143.105) by mail2.redhat.com with SMTP; 24 Jun 1998 18:12:42 -0000 Received: from localhost ([127.0.0.1]) by beezer.med.miami.edu with smtp (ident chris using rfc1413) id m0you2C-0011jDC (Debian Smail-3.2.0.92 1997-Feb-9 #2); Wed, 24 Jun 1998 14:12:40 -0400 (EDT) Date: Wed, 24 Jun 1998 14:12:40 -0400 (EDT) From: Christopher C Chimelis X-Sender: chris@beezer.med.miami.edu To: axp-list@redhat.com Subject: Re: Performance measurements In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 24 Jun 1998, Jeff Sturm wrote: > I'm aware of -mieee and have used it for many applications that would > otherwise die on SIGFPE. But it is hardly ideal--it seems to slow down > the benchmark code by a ratio of 3-4. I'm not exactly sure what it does, > but it seems to add a lot of fp value-checking code. I can do much the > same by inserting statements in my source code, all at the expense of > runtime performance. Yeah, runtime performance is killed by -mieee. My only guess would be to implement a kernel-level handler for this (is this covered in the new math code in later 2.1 kernels?). > My real question is why do these programs run on x86 w/o -mieee? GCC on > x86 just returns NaN or Inf. Trapping errors in hardware sounds a lot > more efficient to me. I can write a signal handler, but it's hard to > recover. I'd rather not get the signal at all. The x86's handle the exception via hardware, whereas the Alphas apparently don't (not sure of this...I haven't read the architecture manual in over a year). > BTW I have no problem with MS Visual C++. Code from gcc causes SIGFPE, > both on Linux and OpenNT. What is it doing differently? MSVC++ may have something that it links in to handle these exceptions. I, personally, would like to see that kinda code added to our kernel if it isn't there. There was talk of a SIGFPE signal handler being added to the kernel, but I'm not sure where that went after discussion. C