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



> Now, if the hardware in question can't create SIGFPE on integer
> divide, I don't think we should torture the compiler into simulating
> it.

Why not?  Emotional question-begging ("torture") aside, that is.

(Well, strictly, no hardware generates SIGFPE, which is an OS thing;
the hardware just traps, with the kernel doing the signal generation.
But I don't see any reason the conditional trap to the kernel has to be
part of the divide instruction; a "trap if OV set" instruction after
the divide proper seems perfectly reasonable to me.)

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index