tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Expected behavior when returning from a SIGFPE handler



>> In some cases, you want to re-execute the instruction.  A simple
>> example is "FPU disabled" on architectures that have such a notion,
>> eg for lazy FPU switching.
> Weâ??re not talking about lazy FPU switching hereâ?? weâ??re talking about p$

(Or timing.  Yes.)  A better example might be turning on
denormalized-result exceptions (does 754 specify them? I'm fairly sure
I've seen at least one FPU that's documented to support them) with a
handler that handles them by setting a global flag, disabling the
exception, and re-executing the instruction, so as to note that a
denormal occurred but otherwise proceeding with the computation.

>> On others, like the VAX, [advancing over an instruction is] a right
>> pain to do in software.
> Iâ??m not particularly concerned about VAX in this case; it doesnâ??t
> have IEEE 754 floating point, so all bets are off :-)

68k, then, or x86 - anything with 754 FP and CISCy enough to have
variable-sized instructions.  The VAX just happens to be the CISC
architecture I know best.

/~\ 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