/* $Header: /home/harrison/c/tcgmsg/ipcv4.0/RCS/srmover.c,v 1.1 91/12/06 17:27:34 harrison Exp Locker: harrison $ */ #if defined(SEQUENT) || defined(CONVEX) #define memcpy(a ,b ,c) bcopy((b), (a), (c)) #else #include #endif void SRmover(a, b, n) char *a, *b; long n; /* Move n bytes from b to a */ { #if defined(ALLIANT) || defined(IBM) || defined(IBMNOEXT) || \ defined(CRAY) || defined(CONVEX) || defined(APOLLO) /* memcpy is fast, Cray is not actually used but alignment crap below won't work in anycase */ (void) memcpy(a, b, (int) n); #else #define UNALIGNED(a) (((unsigned long) (a)) % sizeof(int)) if (UNALIGNED(a) || UNALIGNED(b)) (void) memcpy(a, b, (int) n); /* abdicate responsibility */ else { /* Data is integer aligned ... move first n/sizeof(int) bytes as integers and the remainder as bytes */ int ni = n/sizeof(int); int *ai = (int *) a; int *bi = (int *) b; int i; #ifdef ARDENT #pragma ivdep #endif for (i=0; i