Rename jumps
This commit is contained in:
+6
-6
@@ -166,22 +166,22 @@ has_switch:
|
||||
_str_cmp:
|
||||
li t2, 0
|
||||
|
||||
1:
|
||||
.LByteCmp:
|
||||
add t0, a0, t2
|
||||
add t1, a1, t2
|
||||
lb t0, 0(t0)
|
||||
lb t1, 0(t1)
|
||||
bne t0, t1, 3f # first byte that isn't the same, branch to no match
|
||||
beqz t0, 2f # jump to ret when null is read
|
||||
bne t0, t1, .LNoMatch # first byte that isn't the same, branch to no match
|
||||
beqz t0, .LMatch # jump to ret when null is read
|
||||
addi t2, t2, 1
|
||||
j 1b
|
||||
j .LByteCmp
|
||||
|
||||
3: # no match
|
||||
.LNoMatch: # no match
|
||||
li a0, 0
|
||||
li a1, 0
|
||||
ret
|
||||
|
||||
2: # match
|
||||
.LMatch: # match
|
||||
li a0, 0
|
||||
li a1, 1
|
||||
ret
|
||||
|
||||
Reference in New Issue
Block a user