diff options
Diffstat (limited to 'arch/mips/lib/strnlen_user.S')
-rw-r--r-- | arch/mips/lib/strnlen_user.S | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/mips/lib/strnlen_user.S b/arch/mips/lib/strnlen_user.S index c0ea15194a0e..c768e3000616 100644 --- a/arch/mips/lib/strnlen_user.S +++ b/arch/mips/lib/strnlen_user.S | |||
@@ -28,18 +28,19 @@ | |||
28 | LEAF(__strnlen_user_asm) | 28 | LEAF(__strnlen_user_asm) |
29 | LONG_L v0, TI_ADDR_LIMIT($28) # pointer ok? | 29 | LONG_L v0, TI_ADDR_LIMIT($28) # pointer ok? |
30 | and v0, a0 | 30 | and v0, a0 |
31 | bnez v0, fault | 31 | bnez v0, .Lfault |
32 | 32 | ||
33 | FEXPORT(__strnlen_user_nocheck_asm) | 33 | FEXPORT(__strnlen_user_nocheck_asm) |
34 | move v0, a0 | 34 | move v0, a0 |
35 | PTR_ADDU a1, a0 # stop pointer | 35 | PTR_ADDU a1, a0 # stop pointer |
36 | 1: beq v0, a1, 1f # limit reached? | 36 | 1: beq v0, a1, 1f # limit reached? |
37 | EX(lb, t0, (v0), fault) | 37 | EX(lb, t0, (v0), .Lfault) |
38 | PTR_ADDU v0, 1 | 38 | PTR_ADDU v0, 1 |
39 | bnez t0, 1b | 39 | bnez t0, 1b |
40 | 1: PTR_SUBU v0, a0 | 40 | 1: PTR_SUBU v0, a0 |
41 | jr ra | 41 | jr ra |
42 | END(__strnlen_user_asm) | 42 | END(__strnlen_user_asm) |
43 | 43 | ||
44 | fault: move v0, zero | 44 | .Lfault: |
45 | move v0, zero | ||
45 | jr ra | 46 | jr ra |