Staging: rtl8192u: ieee80211: fixed position of else statements
[linux-2.6/btrfs-unstable.git] / arch / h8300 / lib / strncpy.S
blobd00396a378f41008a6db30b050b99679a0dc3910
1 ;;; strncpy.S
3 #include <asm/linkage.h>
5         .text
6 .global strncpy_from_user
8 ;;; long strncpy_from_user(void *to, void *from, size_t n)
9 strncpy_from_user:
10         mov.l   er2,er2
11         bne     1f
12         sub.l   er0,er0
13         rts
15         mov.l   er4,@-sp
16         sub.l   er3,er3
18         mov.b   @er1+,r4l
19         mov.b   r4l,@er0
20         adds    #1,er0
21         beq     3f
22         inc.l   #1,er3
23         dec.l   #1,er2
24         bne     2b
26         dec.l   #1,er2
28         mov.b   r4l,@er0
29         adds    #1,er0
30         dec.l   #1,er2
31         bne     4b
32         mov.l   er3,er0
33         mov.l   @sp+,er4
34         rts