Path: utzoo!utgpu!water!watmath!clyde!rutgers!rochester!crowl From: crowl@cs.rochester.edu (Lawrence Crowl) Newsgroups: comp.arch Subject: Condition Codes in General Registers Message-ID: <6834@sol.ARPA> Date: 16 Feb 88 03:23:22 GMT References: <191@telesoft.UUCP> <1556@gumby.mips.COM> <208@telesoft.UUCP> <7405@apple.UUCP> Reply-To: crowl@cs.rochester.edu (Lawrence Crowl) Organization: U of Rochester, CS Dept, Rochester, NY Lines: 17 Several authors have been arguing over conditional branching using condition codes versus using booleans in general-purpose registers. Why not store the condition codes in a general-purpose register? This would result in a scheduable two-instruction sequence with multi-way branching at the cost of 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! -- Lawrence Crowl 716-275-9499 University of Rochester crowl@cs.rochester.edu Computer Science Department ...!{allegra,decvax,rutgers}!rochester!crowl Rochester, New York, 14627