Path: utzoo!mnetor!uunet!husc6!ut-sally!ut-emx!reeder From: reeder@ut-emx.UUCP Newsgroups: comp.arch Subject: Re: Condition Codes in General Registers Message-ID: <868@ut-emx.UUCP> Date: 18 Feb 88 00:50:35 GMT References: <191@telesoft.UUCP> <1556@gumby.mips.COM> <208@telesoft.UUCP> <6834@sol.ARPA> Organization: The University of Texas at Austin, Austin, Texas Lines: 23 Summary: that's how a Cray does it In article <6834@sol.ARPA>, crowl@cs.rochester.edu (Lawrence Crowl) writes: > using a general purpose register and slightly lower code density. For example, > > compare R1 with R2 place condition code in R3 > branch to ADDRESS if condition code in R3 is GREATER > branch to ADDRESS if condition code in R3 is EQUAL > branch to ADDRESS if condition code in R3 is LESS > > Will this approach work? Will the condition code comparison in the branch cost > too much? (It is an instruction constant.) Comments please! That is exactly how you do things on a Cray, for example: A0 A1-A2 Compare A1 and A2 JAP addr1 Branch to addr1 if A1 > A2 JAZ addr2 Branch to addr2 if A1 = A2 JAN addr3 Branch to addr3 if A1 < A2 William "Wills" Reeder -- honk honk honk