> What's so bad about have the flag as side-effects ? You can't put any other insn between the compare and the jump. Like, if you wanted to move an address into a register to do the jump, you'd lose the condition bits.
The advantage of having most insns set flags, is you can sometimes avoid the compare completely. > MIPS has no flag ??? how does branching work ? Some chips combine the compare and jump into one insn, like "jeq $r0,4,label". > Or maybe just allow immediates in the mov but that seems like a big > penalty ... Most risc chips have more move insns than other opcodes. So, you'd have two adds (register and sign- or zero-extended immediate), and a variety of moves (lower, upper, extended, etc). You have to think about what kind of constants are going to be common in your software, and plan accordingly.