/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
/*
* memcpy(s1, s2, len)
*
* Copy s2 to s1, always copy n bytes.
* Note: this does not work for overlapped copies, bcopy() does
*
* Fast assembler language version of the following C-program for memcpy
* which represents the `standard' for the C-library.
*
* void *
* memcpy(void *s, const void *s0, size_t n)
* {
* if (n != 0) {
* char *s1 = s;
* const char *s2 = s0;
* do {
* *s1++ = *s2++;
* } while (--n != 0);
* }
* return ( s );
* }
*/
#include <sys/asm_linkage.h>
!
!
.ovbc:
.chksize:
.byte:
.dbalign:
.dbbck:
2:
.bytecp:
exit:
.alignsrc:
.blkchk:
.dwcpy:
4:
1:
/*
* Compare against 256 since we should be checking block addresses
* and (dest & ~63) - (src & ~63) can be 3 blocks even if
* src = dest + (64 * 3) + 63.
*/
6:
1:
sqtr:
hlf:
fqtr:
#define FALIGN_D0 \
#define FALIGN_D16 \
#define FALIGN_D32 \
seg0:
0:
1:
2:
#define FALIGN_D2 \
#define FALIGN_D18 \
#define FALIGN_D34 \
seg1:
0:
1:
2:
#define FALIGN_D4 \
#define FALIGN_D20 \
#define FALIGN_D36 \
seg2:
0:
1:
2:
#define FALIGN_D6 \
#define FALIGN_D22 \
#define FALIGN_D38 \
seg3:
0:
1:
2:
#define FALIGN_D8 \
#define FALIGN_D24 \
#define FALIGN_D40 \
seg4:
0:
1:
2:
#define FALIGN_D10 \
#define FALIGN_D26 \
#define FALIGN_D42 \
seg5:
0:
1:
2:
#define FALIGN_D12 \
#define FALIGN_D28 \
#define FALIGN_D44 \
seg6:
0:
1:
2:
#define FALIGN_D14 \
#define FALIGN_D30 \
#define FALIGN_D46 \
seg7:
0:
1:
2:
!
!