| Pseudoinstructions: Branch | ||||||||||||
| How do we compare values in 2 registers? | ||||||||||||
| Instructions for beq, bne, but not for general relational operators | ||||||||||||
| result | ||||||||||||
| slt $rd, $rs, $rt | R[s] < R[t] | 1 | ||||||||||
| R[s] >= R[t] | 0 | |||||||||||
| Instruction | Real instructions | Semantics | ||||||||||
| bge $rs, $rt, LABEL | slt $at, $rs, $rt | if (R[s] >= R[t]) | ||||||||||
| beq $at, $zero, LABEL | goto LABEL | |||||||||||