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:
462 bytes
|
Line | |
---|
1 | .file "strcpy.S" |
---|
2 | |
---|
3 | .section .text |
---|
4 | .global _strcpy |
---|
5 | .type _strcpy,@function |
---|
6 | _strcpy: |
---|
7 | ;; R1: dest |
---|
8 | ;; R2: source |
---|
9 | #ifdef __RX_DISALLOW_STRING_INSNS__ |
---|
10 | mov r1, r4 ; Leave the destination address unchanged in the result register. |
---|
11 | |
---|
12 | 1: mov.b [r2+], r5 |
---|
13 | mov.b r5, [r4+] |
---|
14 | cmp #0, r5 |
---|
15 | bne 1b |
---|
16 | |
---|
17 | rts |
---|
18 | #else |
---|
19 | mov r1, r4 |
---|
20 | mov #-1, r3 ; Strictly speaking this is incorrect, but I doubt if anyone will ever know. |
---|
21 | smovu |
---|
22 | mov r4, r1 |
---|
23 | rts |
---|
24 | #endif |
---|
25 | .size _strcpy, . - _strcpy |
---|
Note: See
TracBrowser
for help on using the repository browser.