1 /* Cloned and hacked for uClibc by Paul Mundt, December 2003 */
2 /* Modified by SuperH, Inc. September 2003 */
6 ! by Toshiyasu Morita (tm@netcom.com)
8 ! SH5 code by J"orn Rennecke (joern.rennecke@superh.com)
9 ! Copyright 2002 SuperH Ltd.
12 #if __BYTE_ORDER == __LITTLE_ENDIAN
20 .section .text..SHmedia32,"ax"
22 .type memset, @function
32 mperm.w r3, r63, r3 // Fill pattern now in every byte of r3
35 bgtu/u r23, r9, tr0 // multiquad
37 beqi/u r4, 0, tr2 // Return with size 0 - ensures no mem accesses
52 beqi/u r24, 1, tr0 // lastquad
55 andi r5, -8, r20 // calculate end address and
56 addi r20, -7*8, r8 // loop end address; This might overflow, so we need
57 // to use a different test before we start the loop
58 bge/u r24, r9, tr1 // loop
62 beqi/u r24, 1, tr0 // lastquad
65 beqi/u r24, 2, tr0 // lastquad
73 !!! alloco r25, 32 // QQQ comment out for short-term fix to SHUK #3895.
74 // QQQ commenting out is locically correct, but sub-optimal
75 // QQQ Sean McGoogan - 4th April 2003.
81 bgeu/l r8, r25, tr1 // loop