tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: standards on SIGFPE for divide by zero
Date: Tue, 1 Mar 2011 13:41:24 -0800
From: Matt Thomas <jabbathespud%gmail.com@localhost>
PowerPC cann't raise an exception on integer divide by zero. It can
detect it if using the divwo instruction but it still won't raise an
exception. Instead you need to check the OV bit in the XER register.
I see -- I assumed the question implied there was an option about
whether to deliver SIGFPE for integer division by zero on powerpc.
Delivering SIGFPE on floating-point division by zero (&c.) is perhaps
not as important, but nevertheless useful: it enables debugging high-
performance floating-point programs without recompiling them, to find
where an infinity or a NaN turned up before it has contaminated the
whole world. So it would be good to make this work if possible.
Home |
Main Index |
Thread Index |
Old Index