Re: Vincent's comment on Dan's reason to vote NO
On 2010-12-12 06:51:42 -0500, Michel Hack wrote:
> (With regard to Motion 21 and the notion of "state")
>
> Vincent Lef?vre wrote:
> > They are not forced to use the same kind of implementation today.
>
> Dan's point was that they were not forced back then either -- but thought
> they were based on a possible misunderstanding of the wording of the 1985
> standard (IEEE 754).
Yes, they possibly did a mistake in the past, and this was not a
problem with old processors. But this could have changed with new
processors.
Moreover, note that we are not voting on the wording.
Anyway I really wonder whether the state were based on a
misunderstanding of the wording of IEEE 754-1985, which said:
The result of a comparison shall be delivered in one of two ways at
the implementor's option: either as a condition code identifying one
of the four relations listed above, or as a true-false response to a
predicate that names the specific comparison desired.
There's nothing about a global state here and nothing suggesting
that. IEEE 754-1985 described the notion of status flags, but only
for the exceptions, not for the comparisons.
Also, hadn't x87 had a state for comparisons before IEEE 754-1985 came
out? In such a case, the wording of the standard cannot be blamed (and
if the implementation was based on a draft, the working group should
have been aware of a problem with the wording).
I would have thought that a state for FP comparison had been chosen
for the following reasons:
1. It takes a few bits instead of a whole register (let's recall
that registers were very limited at that time).
2. Integer comparison also used a state (probably because of 1).
3. This model was simple and there were no problems with it in
the past (and implementers didn't know the possible problems
with future processors).
BTW, if the 1788 standard could come with one or several implementations
(this is the way some other standards are designed, but this is more
difficult when hardware has to be taken into account), this could make
the wording even more clear.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)