1 /* Cloned and hacked for uClibc by Paul Mundt, December 2003 */
2 /* Modified by SuperH, Inc. September 2003 */
3 ! Entry: arg0: destination
5 ! Exit: result: destination
7 ! SH5 code Copyright 2002 SuperH Ltd.
12 #if __BYTE_ORDER == __LITTLE_ENDIAN
20 .section .text..SHmedia32,"ax"
22 .type strcpy, @function
34 bnei/u r6,0,tr1 /* shortstring */
44 bgt/u r22, r23, tr2 /* no_lddst */
46 /* r22 < r23 : Need to do a load from the destination. */
47 /* r22 == r23 : Doesn't actually need to load from destination, */
48 /* but still can be handled here. */
54 beqi/l r6, 0, tr0 /* loop */
58 blink tr1, r63 /* shortstring */
60 /* r22 > r23: note that for r22 == r23 the sthi.q would clobber */
61 /* bytes before the destination region. */
65 beqi/l r6, 0, tr0 /* loop */
70 #if __BYTE_ORDER != __LITTLE_ENDIAN
71 pta/l shortstring2,tr1
80 blink tr4,r63 /* return */
89 bnei/u r6, 0, tr1 /* shortstring */
94 beqi/l r6, 0, tr0 /* loop */
98 blink tr1, r63 /* shortstring */
100 .size strcpy,.-strcpy
102 libc_hidden_def(strcpy)