From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: X-Archive-Original-Message-ID: <199704091840.NAA11618@sparcplug.itg.ti.com> Date: Wed, 09 Apr 1997 15:05:39 -0400 From: Jim Paradis Subject: SIGFPE Randy Chapman wrote: > Unfortunately, you're still getting an FPE here. However, I > think I can work around this one, it is the other that was more > painful. Hmmm... I see what you're getting after now. I've just been looking into this, and there may be a real problem here. When you specify the -mieee flag to gcc, it generates a DIVT/SU instruction. Supposedly if the /S qualifier is specified, the kernel will do software completion on the divide-by-zero trap, and the software emulator should return the appropriate non-numeric result. I just checked the code and found to my horror that there's a path for 0/0 to return QNaN as it should... but there's *no* path to handle nonzero/0. This *should* return +Inf or -Inf depending on the sign of the dividend. Without this path, the code falls through to where the caller generates a SIGFPE. So, in short: for now, kludge around the divide-by-zero problem with a signal handler, but I should have a kernel patch available fairly soon. -- Jim Paradis jrp@jrp.tiac.net http://www.tiac.net/users/jrp/index.html "It's not procrastination, it's my new Just-In-Time Workload Management System!" -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com