Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- i > -1
- i >= 0
- ;; if (i > -1) {
- cmp eax, -1
- jle else
- then:
- ...
- else:
- ;; if (i >= 0) {
- cmp eax, 0
- jl else
- then:
- ...
- else:
- // if (i >= 0) { (assuming i is in register %t0)
- stl $t1, $0, $t0 // in C: t1 = (0 < t0)
- beq $t1, $0, else // jump if t1 == 0, that is if t0 >= 0
- nop
- then:
- ...
- else:
- // if (i > -1) { (assuming i is in register %t0)
- addi $t2, $0, -1 // in C: t2 = -1
- stl $t1, $t2, $t0 // in C: t1 = (t2 < t0) = (-1 < t0)
- bne $t1, $0, else // jump if t1 != 0, that is if t0 > -1
- nop
- then:
- ...
- else:
- if (length >= str.size())
- if (length > str.size() - 1)
Add Comment
Please, Sign In to add comment