These instructions perform a comparison rs op rt , where op is the comparison contained in the op-code of the instruction (eq —equal, ne —not equal, lt —less than, etc.), and sets the value of rd to 1 if the comparison is TRUE, and to 0 if FALSE.
Most commonly, these are used in conjunction with the conditional branch instructions to make decisions.
|
|
Instruction |
Description |
seq rd, rs, rt |
Set equal |
sne rd, rs, rt |
Set not equal |
slt rd, rs, rt |
Set less |
sltu rd, rs, rt |
Set less unsigned |
slti rd, rs, imm |
Set less immediate |
sltiu rd, rs, imm |
Set less immediate unsigned |
sle rd, rs, rt |
Set less or equal |
sleu rd, rs, rt |
Set less or equal unsigned |
sgt rd, rs, rt |
Set greater |
sgtu rd, rs, rt |
Set greater unsigned |
sge rd, rs, rt |
Set greater or equal |
sgeu rd, rs, rt |
Set greater or equal unsigned |
|