microblaze: Use delay slot in __strnlen_user, __strncpy_user
authorMichal Simek <monstr@monstr.eu>
Sun, 2 Oct 2011 11:07:02 +0000 (13:07 +0200)
committerMichal Simek <monstr@monstr.eu>
Fri, 14 Oct 2011 10:24:34 +0000 (12:24 +0200)
Use delay slot to speedup if maxlen is zero.

Signed-off-by: Michal Simek <monstr@monstr.eu>
arch/microblaze/lib/uaccess_old.S

index 142492ec270fbef323a7e8c37993bf4f38b140f1..f037266cdaf3e358676c0428e83393c16dd410cb 100644 (file)
@@ -34,8 +34,8 @@ __strncpy_user:
         * r3 - temp count
         * r4 - temp val
         */
+       beqid   r7,3f
        addik   r3,r7,0         /* temp_count = len */
-       beqi    r3,3f
 1:
        lbu     r4,r6,r0
        sb      r4,r5,r0
@@ -77,8 +77,8 @@ __strncpy_user:
 .type  __strnlen_user, @function
 .align 4;
 __strnlen_user:
+       beqid   r6,3f
        addik   r3,r6,0
-       beqi    r3,3f
 1:
        lbu     r4,r5,r0
        beqid   r4,2f           /* break on NUL */