ISA -2 Today ----- - Control Instructions - MIPS ISA overview - Other ISAs Control Instructions -------------------- Changes the sequence of the program execution. These occur in the program due to - control statements and loops - if/switch/for/while etc. - procedure calls - exceptions The branching(change of control) can be conditional/unconditional. In all above cases the address of the PC is changed. The decision can be done whether to branch can be taken using: - Comparing two registers/reg-to-mem/reg-to-immediate. - Condition Codes - Flag registers. - Condition Registers. The decision of where to branch can be taken as one of: - relative - absolute - indirect To jump backwards use sign extends PC = PC + SEXT[inst 0-15] To jump to 32 bit quantities use zero extends: PC = PC + ZEXT[inst 0 -15] Example of branching -------------------- if (A