repo.or.cz
/
linux
/
fpc-iii.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
perf tools: Add more sort entry check functions
[linux/fpc-iii.git]
/
arch
/
h8300
/
lib
/
strncpy.S
blob
d00396a378f41008a6db30b050b99679a0dc3910
1
;;; strncpy.S
2
3
#include <asm/linkage.h>
4
5
.text
6
.global strncpy_from_user
7
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
14
1:
15
mov.l er4,@-sp
16
sub.l er3,er3
17
2:
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
25
3:
26
dec.l #1,er2
27
4:
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