I\'d like to ask why the BLT
instruction is not a part of MIPS ISA. Instead they actually make it a pseudo-instruction for assembly programmers. I just couldn\'t re
Because less than zero is really just a sign bit check while less than is a subtract and then jump based on the sign bit of the result. Therefore BLTZ
is much faster. Similarly, >= 0
also needs only 1 sign bit check. <= 0
or > 0
need another zero check but it's rather trivial.
In fact, it's not common that an architecture supports jump-and-compare between two values directly in a single instruction, although most will have jumps based on the value in relation to 0. Even CISC architectures like x86 require the user to compare and then jump