Bounds Check Shortcut
Use this shortcut to reduce an index-out-of-bounds check: jump to IndexOutOfBounds if \$s1 ≥ \$t2 or if $s1 is negative.
Th e checking code just uses u to do both checks:
sltu $t0, $s1, $t2 # $t0= 0 if $s1 >= length or $s1 < 0 beq $t0, $zero, IndexOutOfBounds #if bad, goto Error |