1/* 2Copyright (c) 2009 Nick Clifton <nickc@redhat.com> 3 */ 4 .file "strcpy.S" 5 6 .section .text 7 .global _strcpy 8 .type _strcpy,@function 9_strcpy: 10 ;; R1: dest 11 ;; R2: source 12#ifdef __RX_DISALLOW_STRING_INSNS__ 13 mov r1, r4 ; Leave the destination address unchanged in the result register. 14 151: mov.b [r2+], r5 16 mov.b r5, [r4+] 17 cmp #0, r5 18 bne 1b 19 20 rts 21#else 22 mov r1, r4 23 mov #-1, r3 ; Strictly speaking this is incorrect, but I doubt if anyone will ever know. 24 smovu 25 mov r4, r1 26 rts 27#endif 28 .size _strcpy, . - _strcpy 29