usr/src/lib/libc/sparc/gen/memcpy.s
author Mark J. Nelson <Mark.J.Nelson@Sun.COM>
Wed, 06 Aug 2008 16:29:39 -0600
changeset 7298 b69e27387f74
parent 6812 febeba71273d
child 12719 bd9fb35d09c2
permissions -rw-r--r--
6733918 Teamware has retired, please welcome your new manager, Mercurial 4758439 some files use "current date" sccs keywords 6560843 asm sources should not rely on .file "%M%" for naming STT_FILE symbols 6560958 Solaris:: perl modules should not use SCCS keywords in version information 6729074 webrev doesn't deal well with remote ssh hg parents
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
     1
/*
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
     2
 * CDDL HEADER START
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
     3
 *
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
     4
 * The contents of this file are subject to the terms of the
6515
10dab2b883e0 6678310 using LD_AUDIT, ld.so.1 calls shared library's .init before library is fully relocated
raf
parents: 0
diff changeset
     5
 * Common Development and Distribution License (the "License").
10dab2b883e0 6678310 using LD_AUDIT, ld.so.1 calls shared library's .init before library is fully relocated
raf
parents: 0
diff changeset
     6
 * You may not use this file except in compliance with the License.
0
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
     7
 *
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
     8
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
     9
 * or http://www.opensolaris.org/os/licensing.
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    10
 * See the License for the specific language governing permissions
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    11
 * and limitations under the License.
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    12
 *
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    13
 * When distributing Covered Code, include this CDDL HEADER in each
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    14
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    15
 * If applicable, add the following below this CDDL HEADER, with the
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    16
 * fields enclosed by brackets "[]" replaced with your own identifying
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    17
 * information: Portions Copyright [yyyy] [name of copyright owner]
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    18
 *
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    19
 * CDDL HEADER END
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    20
 */
6515
10dab2b883e0 6678310 using LD_AUDIT, ld.so.1 calls shared library's .init before library is fully relocated
raf
parents: 0
diff changeset
    21
0
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    22
/*
6515
10dab2b883e0 6678310 using LD_AUDIT, ld.so.1 calls shared library's .init before library is fully relocated
raf
parents: 0
diff changeset
    23
 * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
0
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    24
 * Use is subject to license terms.
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    25
 */
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    26
7298
b69e27387f74 6733918 Teamware has retired, please welcome your new manager, Mercurial
Mark J. Nelson <Mark.J.Nelson@Sun.COM>
parents: 6812
diff changeset
    27
	.file	"memcpy.s"
0
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    28
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    29
/*
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    30
 * memcpy(s1, s2, len)
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    31
 *
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    32
 * Copy s2 to s1, always copy n bytes.
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    33
 * Note: this does not work for overlapped copies, bcopy() does
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    34
 *
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    35
 * Fast assembler language version of the following C-program for memcpy
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    36
 * which represents the `standard' for the C-library.
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    37
 *
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    38
 *	void * 
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    39
 *	memcpy(void *s, const void *s0, size_t n)
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    40
 *	{
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    41
 *		if (n != 0) {
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    42
 *	   	    char *s1 = s;
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    43
 *		    const char *s2 = s0;
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    44
 *		    do {
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    45
 *			*s1++ = *s2++;
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    46
 *		    } while (--n != 0);
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    47
 *		}
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    48
 *		return (s);
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    49
 *	}
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    50
 */
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    51
6812
febeba71273d PSARC 2008/309 expunge synonyms.h
raf
parents: 6515
diff changeset
    52
#include "SYS.h"
0
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    53
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    54
	ANSI_PRAGMA_WEAK(memcpy,function)
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    55
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    56
	ENTRY(memcpy)
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    57
	st	%o0, [%sp + 68]		! save des address for return val
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    58
	cmp	%o2, 17			! for small counts copy bytes
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    59
	bleu	.dbytecp
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    60
	andcc	%o1, 3, %o5		! is src word aligned
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    61
	bz	.aldst
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    62
	cmp	%o5, 2			! is src half-word aligned
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    63
	be	.s2algn
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    64
	cmp	%o5, 3			! src is byte aligned
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    65
.s1algn:ldub	[%o1], %o3		! move 1 or 3 bytes to align it
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    66
	inc	1, %o1
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    67
	stb	%o3, [%o0]		! move a byte to align src
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    68
	inc	1, %o0
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    69
	bne	.s2algn
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    70
	dec	%o2
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    71
	b	.ald			! now go align dest
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    72
	andcc	%o0, 3, %o5
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    73
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    74
.s2algn:lduh	[%o1], %o3		! know src is 2 byte alinged
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    75
	inc	2, %o1
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    76
	srl	%o3, 8, %o4
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    77
	stb	%o4, [%o0]		! have to do bytes,
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    78
	stb	%o3, [%o0 + 1]		! don't know dst alingment
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    79
	inc	2, %o0
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    80
	dec	2, %o2
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    81
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    82
.aldst:	andcc	%o0, 3, %o5		! align the destination address
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    83
.ald:	bz	.w4cp
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    84
	cmp	%o5, 2
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    85
	bz	.w2cp
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    86
	cmp	%o5, 3
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    87
.w3cp:	ld	[%o1], %o4
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    88
	inc	4, %o1
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    89
	srl	%o4, 24, %o5
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    90
	stb	%o5, [%o0]
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    91
	bne	.w1cp
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    92
	inc	%o0
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    93
	dec	1, %o2
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    94
	andn	%o2, 3, %o3		! o3 is aligned word count
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    95
	dec	4, %o3			! avoid reading beyond tail of src
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    96
	sub	%o1, %o0, %o1		! o1 gets the difference
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    97
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    98
1:	sll	%o4, 8, %g1		! save residual bytes
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
    99
	ld	[%o1+%o0], %o4
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   100
	deccc	4, %o3
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   101
	srl	%o4, 24, %o5		! merge with residual
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   102
	or	%o5, %g1, %g1
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   103
	st	%g1, [%o0]
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   104
	bnz	1b
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   105
	inc	4, %o0
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   106
	sub	%o1, 3, %o1		! used one byte of last word read
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   107
	and	%o2, 3, %o2
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   108
	b	7f
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   109
	inc	4, %o2
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   110
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   111
.w1cp:	srl	%o4, 8, %o5
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   112
	sth	%o5, [%o0]
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   113
	inc	2, %o0
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   114
	dec	3, %o2
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   115
	andn	%o2, 3, %o3		! o3 is aligned word count
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   116
	dec	4, %o3			! avoid reading beyond tail of src
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   117
	sub	%o1, %o0, %o1		! o1 gets the difference
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   118
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   119
2:	sll	%o4, 24, %g1		! save residual bytes
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   120
	ld	[%o1+%o0], %o4
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   121
	deccc	4, %o3
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   122
	srl	%o4, 8, %o5		! merge with residual
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   123
	or	%o5, %g1, %g1
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   124
	st	%g1, [%o0]
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   125
	bnz	2b
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   126
	inc	4, %o0
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   127
	sub	%o1, 1, %o1		! used three bytes of last word read
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   128
	and	%o2, 3, %o2
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   129
	b	7f
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   130
	inc	4, %o2
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   131
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   132
.w2cp:	ld	[%o1], %o4
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   133
	inc	4, %o1
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   134
	srl	%o4, 16, %o5
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   135
	sth	%o5, [%o0]
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   136
	inc	2, %o0
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   137
	dec	2, %o2
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   138
	andn	%o2, 3, %o3		! o3 is aligned word count
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   139
	dec	4, %o3			! avoid reading beyond tail of src
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   140
	sub	%o1, %o0, %o1		! o1 gets the difference
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   141
	
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   142
3:	sll	%o4, 16, %g1		! save residual bytes
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   143
	ld	[%o1+%o0], %o4
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   144
	deccc	4, %o3
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   145
	srl	%o4, 16, %o5		! merge with residual
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   146
	or	%o5, %g1, %g1
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   147
	st	%g1, [%o0]
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   148
	bnz	3b
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   149
	inc	4, %o0
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   150
	sub	%o1, 2, %o1		! used two bytes of last word read
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   151
	and	%o2, 3, %o2
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   152
	b	7f
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   153
	inc	4, %o2
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   154
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   155
.w4cp:	andn	%o2, 3, %o3		! o3 is aligned word count
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   156
	sub	%o1, %o0, %o1		! o1 gets the difference
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   157
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   158
1:	ld	[%o1+%o0], %o4		! read from address
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   159
	deccc	4, %o3			! decrement count
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   160
	st	%o4, [%o0]		! write at destination address
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   161
	bgu	1b
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   162
	inc	4, %o0			! increment to address
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   163
	b	7f
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   164
	and	%o2, 3, %o2		! number of leftover bytes, if any
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   165
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   166
	!
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   167
	! differenced byte copy, works with any alignment
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   168
	!
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   169
.dbytecp:
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   170
	b	7f
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   171
	sub	%o1, %o0, %o1		! o1 gets the difference
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   172
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   173
4:	stb	%o4, [%o0]		! write to address
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   174
	inc	%o0			! inc to address
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   175
7:	deccc	%o2			! decrement count
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   176
	bgeu,a	4b			! loop till done
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   177
	ldub	[%o1+%o0], %o4		! read from address
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   178
	retl
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   179
	ld	[%sp + 68], %o0		! return s1, destination address
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   180
68f95e015346 OpenSolaris Launch
stevel@tonic-gate
parents:
diff changeset
   181
	SET_SIZE(memcpy)