1 ! Entry: arg0: destination
3 ! Exit: result: destination
5 ! SH5 code Copyright 2002 SuperH Ltd.
20 bnei/u r6,0,tr1 // shortstring
30 bgt/u r22, r23, tr2 // no_lddst
32 // r22 < r23 : Need to do a load from the destination.
33 // r22 == r23 : Doesn't actually need to load from destination,
34 // but still can be handled here.
40 beqi/l r6, 0, tr0 // loop
44 blink tr1, r63 // shortstring
46 // r22 > r23: note that for r22 == r23 the sthi.q would clobber
47 // bytes before the destination region.
51 beqi/l r6, 0, tr0 // loop
56 #ifndef __LITTLE_ENDIAN__
57 pta/l shortstring2,tr1
66 blink tr4,r63 // return
75 bnei/u r6, 0, tr1 // shortstring
80 beqi/l r6, 0, tr0 // loop
84 blink tr1, r63 // shortstring
86 #else /* ! __SHMEDIA__, i.e. SH 1..4 / SHcompact */
93 ! r0,r1,r3,r4: clobbered
104 SL(bf, L_setup_char_loop, mov DST,r0)
108 SL(bt, Longword_loop_end, sub SRC,r0)
127 SL(bf, L_char_loop, mov.b r1,@(r0,SRC))
132 bra L_char_loop_start
134 #endif /* ! __SHMEDIA__ */