Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Jim Paradis <jrp@jrp.tiac.net>
Subject: SIGFPE
Date: Wed, 09 Apr 1997 15:05:39 -0400	[thread overview]
Message-ID: <bd71c2c55c02ac953befa8aabafded09.axp-list@archive.invalid> (raw)

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

             reply	other threads:[~1997-04-09 19:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-04-09 19:05 Jim Paradis [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-04-10 11:41 SIGFPE Olaf Flebbe
1997-04-10 16:09 SIGFPE Jim Paradis
1997-04-10 18:04 SIGFPE Randy Chapman
1997-04-10 19:07 ` SIGFPE Richard Henderson
1997-04-10 19:09 ` SIGFPE Richard Henderson
1997-04-10 18:31 SIGFPE Jim Paradis
1997-08-27 14:23 SIGFPE Christopher J. Grayce
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