Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-spam!ames!oliveb!intelca!amd!amdcad!neptune!brian From: brian@neptune.AMD.COM (Brian McMinn) Newsgroups: comp.arch Subject: Re: AM29000 Booleans Message-ID: <138@neptune.AMD.COM> Date: Wed, 6-May-87 12:19:32 EDT Article-I.D.: neptune.138 Posted: Wed May 6 12:19:32 1987 Date-Received: Sat, 9-May-87 01:19:25 EDT References: <1270@aw.sei.cmu.edu> Reply-To: brian@neptune.AMD.COM (Brian McMinn) Followup-To: comp.arch Organization: Advanced Micro Devices, Inc., Austin, Texas Lines: 26 In article <1270@aw.sei.cmu.edu> firth@sei.cmu.edu (Robert Firth) writes: > [regarding Am29000] > > The machine has comparison instructions that > yield a Boolean result in a register. The > processor description says that TRUE is > represented by a 1 in the MOST significant > bit. Is this a typo? No, this is not a typo. All negative numbers are regarded as Boolean TRUE. Although this does not correspond with the "C" language definition of TRUE, it did gain some speed in the hardware. Since most booleans are produced by compare instructions (things like while(i--) to the contrary, but look at JMPFDEC before you complain too loudly), we could define a boolean to be whatever was convenient. In a hardware comparator, the "result" of the compare is generated from the carry out of the two most significant bits. Rather than routing the result bit back to the lsb or propogating it to all 32 bits, we just stuffed it into the msb. Another nice side effect is that we only need to test ONE bit of the condition register on a jump. -- Brian McMinn 1-(512)-462-5389 Advanced Micro Devices domainLand: brian@neptune.AMD.COM Austin, Texas bangLand: ...!amdcad!neptune!brian