Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!pasteur!ucbvax!ucsd!sdcsvax!ucsdhub!hp-sdd!ncr-sd!rb-dc1!gaither From: gaither@rb-dc1.UUCP (Blaine Gaither) Newsgroups: comp.arch Subject: Re: Yet another dumb question. Message-ID: <147@rb-dc1.UUCP> Date: 5 Apr 88 01:56:54 GMT References: <554@a.UUCP> Reply-To: gaither@rb-dc1.SanDiego.NCR.COM (Blaine Gaither) Distribution: na Organization: Gould CSD, San Diego Lines: 60 Keywords: Floating point, condition codes >I have dumb question (or two actually). My copy of the IEEE floating >point standard is a draft published in 1981. When (and where) was >the final standard published? I can not speak for the final standard, but the copy I have, ANSI/IEEE Std 754-1985. was approved by the IEEE Standards Board on March 21, 1985, and the American National Standards Institute on July 26, 1985. I hope this is the latest version, but perhaps someone on either the Floating-Point Working Group, or the IEEE Standards Board can verify this. > >The draft standard implies that comparisons should be separate instructions >(not subtracts or XORs) and that the result of a compare should be kept in >a condition code. In particular, a comparison of two NaNs must result in >'unordered' even if the NaNs are the same. The standard no longer requires that condition codes not be used, but instead either allows condition codes to be used to identify one of the four relations =,>,<, and unordered, or the true/false response to a predicate that names the desired comparison (read compare op that sets a boolean). >If the result of a compare is >NOT contained in a condition code, how is the 'unordered' result held? >That is: if the compare is by a subtract (r1=r2-r3), what does r1 contain >if r2 and r3 are unordered? > from above, to test for un ordered you execute an op comparing for it, not do a subtract op, unless you are prepared for overflows etc which are not part of the IEEE semantics for compare. IEEE comparisons are exact and never overflow or underflow. >Finally, if a condition code IS required, how is it to work with staged >functional units? If I do three adds followed by a jump on the condition >code - which add sets the condition code that determines the jump. If it's >the last one, doesn't that waste a lot of clocks? Hey thats a problem with condition codes. Who says you have to have just one copy of the condition codes. Your machine could have several copies of the CCs which are specified as an operand to the compare. I believe that the cydra machine uses compare ops to store booleans in registers, all operations have an additional operand which is a predicate specifying whether that operation should store. This is taking multiple copies of the CCs to an extreme. > >J. Giles >Los Alamos Blaine Gaither -- Blaine Gaither ucbvax!sdcsvax!ncr-sd!rb-dc1!bgaither Gould Inc., Advanced Development (619)485-0910 15378 Avenue of Science San Diego, California 92128