MIPS: microMIPS: Optimise 'strnlen' core library function.
authorSteven J. Hill <Steven.Hill@imgtec.com>
Mon, 25 Mar 2013 18:42:18 +0000 (13:42 -0500)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 9 May 2013 15:55:20 +0000 (17:55 +0200)
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>
arch/mips/lib/strnlen_user.S

index beea03c8c0ce823130ab25b421f6874b5a2a13b8..fcacea5e61f1e685891e8e4af7ec8f701c596fd2 100644 (file)
@@ -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_ADD       v0, 1
+       PTR_ADDIU       v0, 1
        bnez            t0, 1b
 1:     PTR_SUBU        v0, a0
        jr              ra