4 ms·
What CPUs in common use still have trap representations? Are there other reasons why reading from an indeterminate value can't give an arbitrary but well-defin
by panic 9y ago
What CPUs in common use still have trap representations? Are there other reasons why reading from an indeterminate value can't give an arbitrary but well-defined result?
- duskwuff 9y agoItanium. (Not very common use, but it's out there.)
- barrkel 9y agox86, in the form of signalling NaNs, when the appropriate fpu flag is set. Some languages feel it's better to fail a computation early and loudly than to silently proceed with a cascade of non-signalling nans possibly getting as far as the screen or database. Delphi for one. C will see this if it's in a library linked with code in such a language.
- panic 9y agoAren't signaling NaNs defined to trigger a floating point exception, not invoke undefined trap-representation behavior? EDIT: I found this proposal (http://www.cl.cam.ac.uk/~pes20/cerberus/n2091.html http://www.cl.cam.ac.uk/~pes20/cerberus/n2091.html) which has some discussion about existing trap representations (including whether to consider signaling NaNs to be trap representations). The conclusion seems to be that segmented pointers on the Motorola 68k are the only place trap representations are truly necessary -- maybe it's time to just remove them.