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.
15 #if __BYTE_ORDER == __LITTLE_ENDIAN
23 .section .text..SHmedia32,"ax"
25 .type memset, @function
35 mperm.w r3, r63, r3 /* Fill pattern now in every byte of r3 */
38 bgtu/u r23, r9, tr0 /* multiquad */
40 beqi/u r4, 0, tr2 /* Return with size 0 - ensures no mem accesses */
55 beqi/u r24, 1, tr0 /* lastquad */
58 andi r5, -8, r20 /* calculate end address and */
59 addi r20, -7*8, r8 /* loop end address; This might overflow, so we need
60 to use a different test before we start the loop
62 bge/u r24, r9, tr1 /* loop */
66 beqi/u r24, 1, tr0 /* lastquad */
69 beqi/u r24, 2, tr0 /* lastquad */
77 !!! alloco r25, 32 /* QQQ comment out for short-term fix to SHUK #3895.
78 QQQ commenting out is locically correct, but sub-optimal
79 QQQ Sean McGoogan - 4th April 2003. */
85 bgeu/l r8, r25, tr1 /* loop */
97 libc_hidden_def(memset)