|
Prev: www.sicortex.com
Next: Intel AVX
From: MitchAlsup on 3 Apr 2008 11:17 On Apr 3, 1:25 am, Ripunjay Tripathi <ripunjay.tripa...(a)gmail.com> wrote: > Any processor with demand paging or IEEE arithmetic trap handlers must > make its exceptions "precise", either in the hardware or with some > software support. > > Can somebody help me justifying this ?? The converse is true. The original 88100 did not have precise exceptions, yet it could run Unix operating systems with paging and handle IEEE traps. What it did do at the moment of an exception, is to record all the potential exceptions, and allow software to unload allo of the pending exceptions in a single swoop. {Yes I know how much software writers 'loved' this, and people that wrote/ported the debugger were especially 'happy'}. So after unloading the machine state, one could find that several exceptions were pending. It is only when you mandate that the program pointer* point at the instruction causing the exception that precision is required. Page fault handling does not need this, nor does FP exception handling. It is only the debugger that needs this, and software that was written assuming only one exception could happen at a single instant of time. Mitch (*) program pointer is 1/2 way between instruction pointer and program counter.
From: Nick Maclaren on 3 Apr 2008 11:32 In article <f030e6cd-ddf4-4c7f-bd55-8bd2573a8597(a)m71g2000hse.googlegroups.com>, MitchAlsup <MitchAlsup(a)aol.com> writes: |> |> The converse is true. The original 88100 did not have precise |> exceptions, yet it could run Unix operating systems with paging and |> handle IEEE traps. |> |> What it did do at the moment of an exception, is to record all the |> potential exceptions, and allow software to unload allo of the pending |> exceptions in a single swoop. {Yes I know how much software writers |> 'loved' this, and people that wrote/ported the debugger were |> especially 'happy'}. So after unloading the machine state, one could |> find that several exceptions were pending. Grrk. I have tackled a rather simpler task, and that stretched me to the limit! Yes, the programmers must have 'loved' that :-) Regards, Nick Maclaren.
From: Jonathan Thornburg [remove -animal to reply] on 10 Apr 2008 09:59 Ripunjay Tripathi <ripunjay.tripathi(a)gmail.com> wrote: > Any processor with demand paging or IEEE arithmetic trap handlers must > make its exceptions "precise", either in the hardware or with some > software support. > > Can somebody help me justifying this ?? For IEEE (floating-point) arithmetic, the key point is that the IEEE 754 standard (the original version, not the 754R revision currently under discussion) requires that the result of any IEEE (floating-point) arithmetic operation must be the true "infinitely-precise" result, rounded according to the current rounding mode. Thus the hardware (possibly with some software support) needs to be able to compute this "infinitely-precise" result as an intermediate step. This is explained in more detail in http://docs.sun.com/source/806-3568/ncg_goldberg.html . -- -- Jonathan Thornburg <J.Thornburg(a)soton.ac.uk> School of Mathematics, U of Southampton, England "Floating point numbers are like sandpiles; every time you move one you lose a little sand and pick up a little dirt" -- Victor Vyssotsky
From: Nick Maclaren on 10 Apr 2008 10:17 In article <666kp4F2ja3diU1(a)mid.individual.net>, "Jonathan Thornburg [remove -animal to reply]" <J.Thornburg(a)soton.ac-zebra.uk> writes: |> Ripunjay Tripathi <ripunjay.tripathi(a)gmail.com> wrote: |> > Any processor with demand paging or IEEE arithmetic trap handlers must |> > make its exceptions "precise", either in the hardware or with some |> > software support. |> > |> > Can somebody help me justifying this ?? |> |> For IEEE (floating-point) arithmetic, the key point is that the IEEE 754 |> standard (the original version, not the 754R revision currently under |> discussion) requires that the result of any IEEE (floating-point) |> arithmetic operation must be the true "infinitely-precise" result, |> rounded according to the current rounding mode. Thus the hardware |> (possibly with some software support) needs to be able to compute this |> "infinitely-precise" result as an intermediate step. This is explained |> in more detail in http://docs.sun.com/source/806-3568/ncg_goldberg.html . Grrk. No, it doesn't require that you calculate the "infinitely-precise" result, but I agree that explaining why you don't is too complicated for most readers of this group. You need only calculate the final result "as if" you had done it like that. And, typically, interrupts aren't used for correcting the answer, but for the handling of exceptions and denormalised numbers. Indeed, ARE there any IEEE 754 implementations that calculate the result roughly and use fixups to correct the answer when that gets the wrong one? Regards, Nick Maclaren.
From: Quadibloc on 11 Apr 2008 14:18
On Apr 10, 8:17 am, n...(a)cus.cam.ac.uk (Nick Maclaren) wrote: > Grrk. No, it doesn't require that you calculate the "infinitely-precise" > result, but I agree that explaining why you don't is too complicated for > most readers of this group. Let's just say one needs to calculate an infinitely-correct finitely- precise result (no rounding X.5000001 down or X.4999999 up) and the curious can read up on IEEE-754 and the guard, round, and sticky bits if they want. John Savard |