Skip to content

Commit

Permalink
MIPS: microMIPS: Optimise 'strnlen' core library function.
Browse files Browse the repository at this point in the history
Optimise 'strnlen' to use microMIPS instructions and/or optimisations
for binary size reduction. When the microMIPS ISA is not being used,
the library function compiles to the original binary code.

Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com>
  • Loading branch information
Steven J. Hill authored and Ralf Baechle committed May 9, 2013
1 parent b1bac37 commit 3e9f37e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/mips/lib/strnlen_user.S
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FEXPORT(__strnlen_user_nocheck_asm)
PTR_ADDU a1, a0 # stop pointer
1: beq v0, a1, 1f # limit reached?
EX(lb, t0, (v0), .Lfault)
PTR_ADDU v0, 1
PTR_ADDIU v0, 1
bnez t0, 1b
1: PTR_SUBU v0, a0
jr ra
Expand Down

0 comments on commit 3e9f37e

Please sign in to comment.