Last change
on this file since 444 was
444,
checked in by satin@…, 6 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
319 bytes
|
Line | |
---|
1 | #include "setarch.h" |
---|
2 | |
---|
3 | #include "defines.h" |
---|
4 | |
---|
5 | ; dst A0 |
---|
6 | ; src A1 |
---|
7 | ; len A2 |
---|
8 | |
---|
9 | .global ___reg_memset |
---|
10 | ___reg_memset: |
---|
11 | MOVP A0P,A3P |
---|
12 | MOVP A2P,A2P |
---|
13 | beq noset |
---|
14 | |
---|
15 | memloop: |
---|
16 | mov.b A1L,@A0P |
---|
17 | #ifdef __NORMAL_MODE__ |
---|
18 | add #1,A0P |
---|
19 | sub #1,A2P |
---|
20 | #else |
---|
21 | adds #1,A0P |
---|
22 | subs #1,A2P |
---|
23 | #endif |
---|
24 | MOVP A2P,A2P |
---|
25 | bne memloop |
---|
26 | |
---|
27 | noset: |
---|
28 | MOVP A3P,A0P |
---|
29 | rts |
---|
30 | |
---|
Note: See
TracBrowser
for help on using the repository browser.