
#include "copy.h"


#ifndef VC_PROJ
#include <xtensa/tie/xt_hifi2.h>
#endif

#ifndef SUN_COPY_32_OPT_ASM
void SUN_COPY_32(int *y, int *x, short size)
{
#ifndef HW_HIFI3
	do{*y++ = *x++;}
	while(--size);
#else
	ae_int32x4 *y_4 = (ae_int32x4 *)(y);
	ae_int32x4 *x_4 = (ae_int32x4 *)(x);

	do
	{
		*y_4++ = *x_4++;
		size = size - 4;
	}
	while(size);


#endif
}
#endif




void SUN_CLEAR_uchar(unsigned char *dst, short size)
{
	

	while(size--)
		*dst++ = 0;	
//	do{*dst++ = 0;} while(--size);
}
