Nicolas Pitre has a new email address
[safe/jmp/linux-2.6] / arch / arm / lib / clear_user.S
index ecb28dc..1279abd 100644 (file)
@@ -18,7 +18,8 @@
  *          : sz   - number of bytes to clear
  * Returns  : number of bytes NOT cleared
  */
-ENTRY(__clear_user)
+ENTRY(__clear_user_std)
+WEAK(__clear_user)
                stmfd   sp!, {r1, lr}
                mov     r2, #0
                cmp     r1, #4
@@ -26,24 +27,24 @@ ENTRY(__clear_user)
                ands    ip, r0, #3
                beq     1f
                cmp     ip, #2
-USER(          strbt   r2, [r0], #1)
-USER(          strlebt r2, [r0], #1)
-USER(          strltbt r2, [r0], #1)
+               strusr  r2, r0, 1
+               strusr  r2, r0, 1, le
+               strusr  r2, r0, 1, lt
                rsb     ip, ip, #4
                sub     r1, r1, ip              @  7  6  5  4  3  2  1
 1:             subs    r1, r1, #8              @ -1 -2 -3 -4 -5 -6 -7
-USER(          strplt  r2, [r0], #4)
-USER(          strplt  r2, [r0], #4)
+               strusr  r2, r0, 4, pl, rept=2
                bpl     1b
                adds    r1, r1, #4              @  3  2  1  0 -1 -2 -3
-USER(          strplt  r2, [r0], #4)
+               strusr  r2, r0, 4, pl
 2:             tst     r1, #2                  @ 1x 1x 0x 0x 1x 1x 0x
-USER(          strnebt r2, [r0], #1)
-USER(          strnebt r2, [r0], #1)
+               strusr  r2, r0, 1, ne, rept=2
                tst     r1, #1                  @ x1 x0 x1 x0 x1 x0 x1
-USER(          strnebt r2, [r0], #1)
+               it      ne                      @ explicit IT needed for the label
+USER(          strnebt r2, [r0])
                mov     r0, #0
                ldmfd   sp!, {r1, pc}
+ENDPROC(__clear_user)
 
                .section .fixup,"ax"
                .align  0