17c478bd9Sstevel@tonic-gate/*
27c478bd9Sstevel@tonic-gate * CDDL HEADER START
37c478bd9Sstevel@tonic-gate *
47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the
57257d1b4Sraf * Common Development and Distribution License (the "License").
67257d1b4Sraf * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate *
87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate * and limitations under the License.
127c478bd9Sstevel@tonic-gate *
137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate *
197c478bd9Sstevel@tonic-gate * CDDL HEADER END
207c478bd9Sstevel@tonic-gate */
217257d1b4Sraf
227c478bd9Sstevel@tonic-gate/*
23*1e49577aSRod Evans * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
247c478bd9Sstevel@tonic-gate */
257c478bd9Sstevel@tonic-gate
269a70fc3bSMark J. Nelson	.file	"memcpy.s"
277257d1b4Sraf
287c478bd9Sstevel@tonic-gate/*
297c478bd9Sstevel@tonic-gate * memcpy(s1, s2, len)
307c478bd9Sstevel@tonic-gate *
317c478bd9Sstevel@tonic-gate * Copy s2 to s1, always copy n bytes.
327c478bd9Sstevel@tonic-gate * Note: this does not work for overlapped copies, bcopy() does
337c478bd9Sstevel@tonic-gate *
347c478bd9Sstevel@tonic-gate * Fast assembler language version of the following C-program for memcpy
357c478bd9Sstevel@tonic-gate * which represents the `standard' for the C-library.
367c478bd9Sstevel@tonic-gate *
377c478bd9Sstevel@tonic-gate *	void *
387c478bd9Sstevel@tonic-gate *	memcpy(void *s, const void *s0, size_t n)
397c478bd9Sstevel@tonic-gate *	{
407c478bd9Sstevel@tonic-gate *		if (n != 0) {
417c478bd9Sstevel@tonic-gate *	   	    char *s1 = s;
427c478bd9Sstevel@tonic-gate *		    const char *s2 = s0;
437c478bd9Sstevel@tonic-gate *		    do {
447c478bd9Sstevel@tonic-gate *			*s1++ = *s2++;
457c478bd9Sstevel@tonic-gate *		    } while (--n != 0);
467c478bd9Sstevel@tonic-gate *		}
477c478bd9Sstevel@tonic-gate *		return ( s );
487c478bd9Sstevel@tonic-gate *	}
497c478bd9Sstevel@tonic-gate */
507c478bd9Sstevel@tonic-gate
517c478bd9Sstevel@tonic-gate#include <sys/asm_linkage.h>
527c478bd9Sstevel@tonic-gate#include <sys/sun4asi.h>
537c478bd9Sstevel@tonic-gate#include <sys/trap.h>
547c478bd9Sstevel@tonic-gate
557c478bd9Sstevel@tonic-gate	ANSI_PRAGMA_WEAK(memmove,function)
567c478bd9Sstevel@tonic-gate	ANSI_PRAGMA_WEAK(memcpy,function)
577c478bd9Sstevel@tonic-gate
587c478bd9Sstevel@tonic-gate	ENTRY(memmove)
597c478bd9Sstevel@tonic-gate	cmp	%o1, %o0	! if from address is >= to use forward copy
607c478bd9Sstevel@tonic-gate	bgeu	%ncc, forcpy	! else use backward if ...
617c478bd9Sstevel@tonic-gate	sub	%o0, %o1, %o4	! get difference of two addresses
627c478bd9Sstevel@tonic-gate	cmp	%o2, %o4	! compare size and difference of addresses
637c478bd9Sstevel@tonic-gate	bleu	%ncc, forcpy	! if size is bigger, do overlapped copy
647c478bd9Sstevel@tonic-gate	nop
657c478bd9Sstevel@tonic-gate
667c478bd9Sstevel@tonic-gate        !
677c478bd9Sstevel@tonic-gate        ! an overlapped copy that must be done "backwards"
687c478bd9Sstevel@tonic-gate        !
697c478bd9Sstevel@tonic-gate.ovbc:
707c478bd9Sstevel@tonic-gate	mov	%o0, %o5		! save des address for return val
717c478bd9Sstevel@tonic-gate	add     %o1, %o2, %o1           ! get to end of source space
727c478bd9Sstevel@tonic-gate        add     %o0, %o2, %o0           ! get to end of destination space
737c478bd9Sstevel@tonic-gate
747c478bd9Sstevel@tonic-gate.chksize:
757c478bd9Sstevel@tonic-gate	cmp	%o2, 8
767c478bd9Sstevel@tonic-gate	bgeu,pn	%ncc, .dbalign
777c478bd9Sstevel@tonic-gate	nop
787c478bd9Sstevel@tonic-gate
797c478bd9Sstevel@tonic-gate
807c478bd9Sstevel@tonic-gate.byte:
817c478bd9Sstevel@tonic-gate1:	deccc	%o2			! decrement count
827c478bd9Sstevel@tonic-gate	blu,pn	%ncc, exit		! loop until done
837c478bd9Sstevel@tonic-gate	dec	%o0			! decrement to address
847c478bd9Sstevel@tonic-gate	dec	%o1			! decrement from address
857c478bd9Sstevel@tonic-gate        ldub	[%o1], %o3		! read a byte
867c478bd9Sstevel@tonic-gate        ba	1b			! loop until done
877c478bd9Sstevel@tonic-gate	stb	%o3, [%o0]		! write byte
887c478bd9Sstevel@tonic-gate
897c478bd9Sstevel@tonic-gate.dbalign:
907c478bd9Sstevel@tonic-gate	andcc	%o0, 7, %o3
917c478bd9Sstevel@tonic-gate	bz	%ncc, .dbbck
927c478bd9Sstevel@tonic-gate	nop
937c478bd9Sstevel@tonic-gate	dec	%o1
947c478bd9Sstevel@tonic-gate	dec	%o0
957c478bd9Sstevel@tonic-gate	dec	%o2
967c478bd9Sstevel@tonic-gate	ldub	[%o1], %o3
977c478bd9Sstevel@tonic-gate	ba	.chksize
987c478bd9Sstevel@tonic-gate	stb	%o3, [%o0]
997c478bd9Sstevel@tonic-gate
1007c478bd9Sstevel@tonic-gate.dbbck:
1017c478bd9Sstevel@tonic-gate
1027c478bd9Sstevel@tonic-gate        rd      %fprs, %o3              ! o3 = fprs
1037c478bd9Sstevel@tonic-gate
1047c478bd9Sstevel@tonic-gate
1057c478bd9Sstevel@tonic-gate        ! if fprs.fef == 0, set it. Checking it, reqires 2 instructions.
1067c478bd9Sstevel@tonic-gate        ! So set it anyway, without checking.
1077c478bd9Sstevel@tonic-gate        wr      %g0, 0x4, %fprs         ! fprs.fef = 1
1087c478bd9Sstevel@tonic-gate
1097c478bd9Sstevel@tonic-gate        alignaddr	%o1, %g0, %g1		! align src
1107c478bd9Sstevel@tonic-gate        ldd	[%g1], %d0		! get first 8 byte block
1117c478bd9Sstevel@tonic-gate	sub	%g1, 8, %g1
1127c478bd9Sstevel@tonic-gate	andn	%o2, 7, %o4
1137c478bd9Sstevel@tonic-gate	sub	%o1, %o4, %o1
1147c478bd9Sstevel@tonic-gate
1157c478bd9Sstevel@tonic-gate2:
1167c478bd9Sstevel@tonic-gate	sub	%o0, 8, %o0		! since we are at the end
1177c478bd9Sstevel@tonic-gate					! when we first enter the loop
1187c478bd9Sstevel@tonic-gate        ldd	[%g1], %d2
1197c478bd9Sstevel@tonic-gate        faligndata %d2, %d0, %d8	! extract 8 bytes out
1207c478bd9Sstevel@tonic-gate        std	%d8, [%o0]		! store it
1217c478bd9Sstevel@tonic-gate
1227c478bd9Sstevel@tonic-gate	sub	%g1, 8, %g1
1237c478bd9Sstevel@tonic-gate        sub	%o2, 8, %o2		! 8 less bytes to copy
1247c478bd9Sstevel@tonic-gate	cmp	%o2, 8			! or do we have < 8 bytes
1257c478bd9Sstevel@tonic-gate        bgeu,pt	%ncc, 2b
1267c478bd9Sstevel@tonic-gate	fmovd	%d2, %d0
1277c478bd9Sstevel@tonic-gate
1287c478bd9Sstevel@tonic-gate        and     %o3, 0x4, %o3           ! fprs.du = fprs.dl = 0
1297c478bd9Sstevel@tonic-gate        ba      .byte
1307c478bd9Sstevel@tonic-gate        wr      %o3, %g0, %fprs         ! fprs = o3 - restore fprs
1317c478bd9Sstevel@tonic-gate
1327c478bd9Sstevel@tonic-gate	SET_SIZE(memmove)
1337c478bd9Sstevel@tonic-gate
1347c478bd9Sstevel@tonic-gate
1357c478bd9Sstevel@tonic-gate	ENTRY(memcpy)
1367c478bd9Sstevel@tonic-gate	ENTRY(__align_cpy_1)
1377c478bd9Sstevel@tonic-gateforcpy:
1387c478bd9Sstevel@tonic-gate	mov	%o0, %o5		! save des address for return val
1397c478bd9Sstevel@tonic-gate
1407c478bd9Sstevel@tonic-gate	cmp	%o2, 32			! for small counts copy bytes
1417c478bd9Sstevel@tonic-gate	bgu,a	%ncc, .alignsrc
1427c478bd9Sstevel@tonic-gate	andcc   %o1, 7, %o3             ! is src aligned on a 8 byte bound
1437c478bd9Sstevel@tonic-gate
1447c478bd9Sstevel@tonic-gate.bytecp:
1457c478bd9Sstevel@tonic-gate	! Do byte copy
1467c478bd9Sstevel@tonic-gate	tst	%o2
1477c478bd9Sstevel@tonic-gate	bleu,a,pn %ncc, exit
1487c478bd9Sstevel@tonic-gate	nop
1497c478bd9Sstevel@tonic-gate
1507c478bd9Sstevel@tonic-gate1:	ldub	[%o1], %o4
1517c478bd9Sstevel@tonic-gate	inc 	%o1
1527c478bd9Sstevel@tonic-gate	inc	%o0
1537c478bd9Sstevel@tonic-gate	deccc	%o2
1547c478bd9Sstevel@tonic-gate	bgu	%ncc, 1b
1557c478bd9Sstevel@tonic-gate	stb	%o4, [%o0 - 1]
1567c478bd9Sstevel@tonic-gate
1577c478bd9Sstevel@tonic-gateexit:
1587c478bd9Sstevel@tonic-gate	retl
1597c478bd9Sstevel@tonic-gate	mov	%o5, %o0
1607c478bd9Sstevel@tonic-gate
1617c478bd9Sstevel@tonic-gate.alignsrc:
1627c478bd9Sstevel@tonic-gate        bz      %ncc, .bigcpy		! src already double aligned
1637c478bd9Sstevel@tonic-gate	sub     %o3, 8, %o3
1647c478bd9Sstevel@tonic-gate        neg     %o3                     ! bytes till src double aligned
1657c478bd9Sstevel@tonic-gate
1667c478bd9Sstevel@tonic-gate        sub     %o2, %o3, %o2           ! update o2 with new count
1677c478bd9Sstevel@tonic-gate
1687c478bd9Sstevel@tonic-gate	! Copy %o3 bytes till double aligned
1697c478bd9Sstevel@tonic-gate
1707c478bd9Sstevel@tonic-gate2:      ldub    [%o1], %o4
1717c478bd9Sstevel@tonic-gate        inc     %o1
1727c478bd9Sstevel@tonic-gate        inc     %o0
1737c478bd9Sstevel@tonic-gate        deccc   %o3
1747c478bd9Sstevel@tonic-gate        bgu	%ncc, 2b
1757c478bd9Sstevel@tonic-gate        stb     %o4, [%o0 - 1]
1767c478bd9Sstevel@tonic-gate
1777c478bd9Sstevel@tonic-gate	! Now Source (%o1) is double word aligned
1787c478bd9Sstevel@tonic-gate
1797c478bd9Sstevel@tonic-gate.bigcpy: 				! >= 17 bytes to copy
1807c478bd9Sstevel@tonic-gate	andcc	%o0, 7, %o3		! is dst aligned on a 8 byte bound
1817c478bd9Sstevel@tonic-gate        bz      %ncc, .blkchk		! already double aligned
1827c478bd9Sstevel@tonic-gate	sub     %o3, 8, %o3
1837c478bd9Sstevel@tonic-gate        neg     %o3                     ! bytes till double aligned
1847c478bd9Sstevel@tonic-gate
1857c478bd9Sstevel@tonic-gate        sub     %o2, %o3, %o2           ! update o2 with new count
1867c478bd9Sstevel@tonic-gate
1877c478bd9Sstevel@tonic-gate	! Copy %o3 bytes till double aligned
1887c478bd9Sstevel@tonic-gate
1897c478bd9Sstevel@tonic-gate3:      ldub    [%o1], %o4
1907c478bd9Sstevel@tonic-gate        inc     %o1
1917c478bd9Sstevel@tonic-gate        inc     %o0
1927c478bd9Sstevel@tonic-gate        deccc   %o3
1937c478bd9Sstevel@tonic-gate        bgu	%ncc, 3b
1947c478bd9Sstevel@tonic-gate        stb     %o4, [%o0 - 1]
1957c478bd9Sstevel@tonic-gate
1967c478bd9Sstevel@tonic-gate	! Now Destination (%o0) is double word aligned
1977c478bd9Sstevel@tonic-gate.blkchk:
1987c478bd9Sstevel@tonic-gate	cmp     %o2, 384		! if cnt < 256 + 128 -  no Block ld/st
1997c478bd9Sstevel@tonic-gate	bgeu,a	%ncc, blkcpy		!    do double word copy
2007c478bd9Sstevel@tonic-gate	subcc	%o0, %o1, %o4		! %o4 = dest - src
2017c478bd9Sstevel@tonic-gate
2027c478bd9Sstevel@tonic-gate	! double word copy - using ldd and faligndata. Copies upto
2037c478bd9Sstevel@tonic-gate	! 8 byte multiple count and does byte copy for the residual.
2047c478bd9Sstevel@tonic-gate.dwcpy:
2057c478bd9Sstevel@tonic-gate	rd	%fprs, %o3		! o3 = fprs
2067c478bd9Sstevel@tonic-gate
2077c478bd9Sstevel@tonic-gate	! if fprs.fef == 0, set it. Checking it, reqires 2 instructions.
2087c478bd9Sstevel@tonic-gate	! So set it anyway, without checking.
2097c478bd9Sstevel@tonic-gate	wr	%g0, 0x4, %fprs 	! fprs.fef = 1
2107c478bd9Sstevel@tonic-gate	andn    %o2, 7, %o4     	! o4 has 8 byte aligned cnt
2117c478bd9Sstevel@tonic-gate	sub	%o4, 8, %o4
2127c478bd9Sstevel@tonic-gate        alignaddr %o1, %g0, %g1
2137c478bd9Sstevel@tonic-gate        ldd     [%g1], %d0
2147c478bd9Sstevel@tonic-gate        add     %g1, 8, %g1
2157c478bd9Sstevel@tonic-gate4:
2167c478bd9Sstevel@tonic-gate        ldd     [%g1], %d2
2177c478bd9Sstevel@tonic-gate        add     %g1, 8, %g1
2187c478bd9Sstevel@tonic-gate        sub     %o2, 8, %o2
2197c478bd9Sstevel@tonic-gate        subcc   %o4, 8, %o4
2207c478bd9Sstevel@tonic-gate        faligndata %d0, %d2, %d8
2217c478bd9Sstevel@tonic-gate        std     %d8, [%o0]
2227c478bd9Sstevel@tonic-gate        add     %o1, 8, %o1
2237c478bd9Sstevel@tonic-gate        bz,pn   %ncc, .residcp
2247c478bd9Sstevel@tonic-gate        add     %o0, 8, %o0
2257c478bd9Sstevel@tonic-gate        ldd     [%g1], %d0
2267c478bd9Sstevel@tonic-gate        add     %g1, 8, %g1
2277c478bd9Sstevel@tonic-gate        sub     %o2, 8, %o2
2287c478bd9Sstevel@tonic-gate        subcc   %o4, 8, %o4
2297c478bd9Sstevel@tonic-gate        faligndata %d2, %d0, %d8
2307c478bd9Sstevel@tonic-gate        std     %d8, [%o0]
2317c478bd9Sstevel@tonic-gate        add     %o1, 8, %o1
2327c478bd9Sstevel@tonic-gate        bgu,pn	%ncc, 4b
2337c478bd9Sstevel@tonic-gate        add     %o0, 8, %o0
2347c478bd9Sstevel@tonic-gate
2357c478bd9Sstevel@tonic-gate.residcp:				! Do byte copy
2367c478bd9Sstevel@tonic-gate	tst	%o2
2377c478bd9Sstevel@tonic-gate	bz,a,pn %ncc, dwexit
2387c478bd9Sstevel@tonic-gate	nop
2397c478bd9Sstevel@tonic-gate
2407c478bd9Sstevel@tonic-gate5:	ldub	[%o1], %o4
2417c478bd9Sstevel@tonic-gate	inc 	%o1
2427c478bd9Sstevel@tonic-gate	inc	%o0
2437c478bd9Sstevel@tonic-gate	deccc	%o2
2447c478bd9Sstevel@tonic-gate	bgu	%ncc, 5b
2457c478bd9Sstevel@tonic-gate	stb	%o4, [%o0 - 1]
2467c478bd9Sstevel@tonic-gate
2477c478bd9Sstevel@tonic-gatedwexit:
2487c478bd9Sstevel@tonic-gate        and     %o3, 0x4, %o3           ! fprs.du = fprs.dl = 0
2497c478bd9Sstevel@tonic-gate        wr      %o3, %g0, %fprs         ! fprs = o3 - restore fprs
2507c478bd9Sstevel@tonic-gate	retl
2517c478bd9Sstevel@tonic-gate	mov	%o5, %o0
2527c478bd9Sstevel@tonic-gate
2537c478bd9Sstevel@tonic-gateblkcpy:
2547c478bd9Sstevel@tonic-gate	! subcc	%o0, %o1, %o4		! in delay slot of branch
2557c478bd9Sstevel@tonic-gate	bneg,a,pn %ncc, 1f		! %o4 = abs(%o4)
2567c478bd9Sstevel@tonic-gate	neg	%o4
2577c478bd9Sstevel@tonic-gate1:
2587c478bd9Sstevel@tonic-gate	/*
2597c478bd9Sstevel@tonic-gate	 * Compare against 256 since we should be checking block addresses
2607c478bd9Sstevel@tonic-gate	 * and (dest & ~63) - (src & ~63) can be 3 blocks even if
2617c478bd9Sstevel@tonic-gate	 * src = dest + (64 * 3) + 63.
2627c478bd9Sstevel@tonic-gate	 */
2637c478bd9Sstevel@tonic-gate	cmp	%o4, 256		! if smaller than 3 blocks skip
2647c478bd9Sstevel@tonic-gate	blu,pn	%ncc, .dwcpy		! and do it the slower way
2657c478bd9Sstevel@tonic-gate	andcc	%o0, 63, %o3
2667c478bd9Sstevel@tonic-gate
2677c478bd9Sstevel@tonic-gate	save    %sp, -SA(MINFRAME), %sp
2687c478bd9Sstevel@tonic-gate        rd      %fprs, %l3              ! l3 = fprs
2697c478bd9Sstevel@tonic-gate
2707c478bd9Sstevel@tonic-gate        ! if fprs.fef == 0, set it. Checking it, reqires 2 instructions.
2717c478bd9Sstevel@tonic-gate        ! So set it anyway, without checking.
2727c478bd9Sstevel@tonic-gate        wr      %g0, 0x4, %fprs         ! fprs.fef = 1
2737c478bd9Sstevel@tonic-gate
2747c478bd9Sstevel@tonic-gate        bz,pn   %ncc, blalign           ! now block aligned
2757c478bd9Sstevel@tonic-gate        sub     %i3, 64, %i3
2767c478bd9Sstevel@tonic-gate        neg     %i3                     ! bytes till block aligned
2777c478bd9Sstevel@tonic-gate	sub	%i2, %i3, %i2		! update %i2 with new count
2787c478bd9Sstevel@tonic-gate
2797c478bd9Sstevel@tonic-gate	! Copy %i3 bytes till dst is block (64 byte) aligned. use
2807c478bd9Sstevel@tonic-gate	! double word copies.
2817c478bd9Sstevel@tonic-gate
2827c478bd9Sstevel@tonic-gate        alignaddr %i1, %g0, %g1
2837c478bd9Sstevel@tonic-gate        ldd     [%g1], %d0
2847c478bd9Sstevel@tonic-gate        add     %g1, 8, %g1
2857c478bd9Sstevel@tonic-gate6:
2867c478bd9Sstevel@tonic-gate        ldd     [%g1], %d2
2877c478bd9Sstevel@tonic-gate        add     %g1, 8, %g1
2887c478bd9Sstevel@tonic-gate        subcc   %i3, 8, %i3
2897c478bd9Sstevel@tonic-gate        faligndata %d0, %d2, %d8
2907c478bd9Sstevel@tonic-gate        std     %d8, [%i0]
2917c478bd9Sstevel@tonic-gate        add     %i1, 8, %i1
2927c478bd9Sstevel@tonic-gate        bz,pn   %ncc, blalign
2937c478bd9Sstevel@tonic-gate        add     %i0, 8, %i0
2947c478bd9Sstevel@tonic-gate        ldd     [%g1], %d0
2957c478bd9Sstevel@tonic-gate        add     %g1, 8, %g1
2967c478bd9Sstevel@tonic-gate        subcc   %i3, 8, %i3
2977c478bd9Sstevel@tonic-gate        faligndata %d2, %d0, %d8
2987c478bd9Sstevel@tonic-gate        std     %d8, [%i0]
2997c478bd9Sstevel@tonic-gate        add     %i1, 8, %i1
3007c478bd9Sstevel@tonic-gate        bgu,pn	%ncc, 6b
3017c478bd9Sstevel@tonic-gate        add     %i0, 8, %i0
3027c478bd9Sstevel@tonic-gate
3037c478bd9Sstevel@tonic-gateblalign:
3047c478bd9Sstevel@tonic-gate	membar  #StoreLoad
3057c478bd9Sstevel@tonic-gate	! %i2 = total length
3067c478bd9Sstevel@tonic-gate	! %i3 = blocks  (length - 64) / 64
3077c478bd9Sstevel@tonic-gate	! %i4 = doubles remaining  (length - blocks)
3087c478bd9Sstevel@tonic-gate	sub	%i2, 64, %i3
3097c478bd9Sstevel@tonic-gate	andn	%i3, 63, %i3
3107c478bd9Sstevel@tonic-gate	sub	%i2, %i3, %i4
3117c478bd9Sstevel@tonic-gate	andn	%i4, 7, %i4
3127c478bd9Sstevel@tonic-gate	sub	%i4, 16, %i4
3137c478bd9Sstevel@tonic-gate	sub	%i2, %i4, %i2
3147c478bd9Sstevel@tonic-gate	sub	%i2, %i3, %i2
3157c478bd9Sstevel@tonic-gate
3167c478bd9Sstevel@tonic-gate	andn	%i1, 0x3F, %l7		! blk aligned address
3177c478bd9Sstevel@tonic-gate	alignaddr %i1, %g0, %g0		! gen %gsr
3187c478bd9Sstevel@tonic-gate
3197c478bd9Sstevel@tonic-gate	srl	%i1, 3, %l5		! bits 3,4,5 are now least sig in  %l5
3207c478bd9Sstevel@tonic-gate	andcc  	%l5, 7, %l6		! mask everything except bits 1,2 3
3217c478bd9Sstevel@tonic-gate	add	%i1, %i4, %i1
3227c478bd9Sstevel@tonic-gate	add	%i1, %i3, %i1
3237c478bd9Sstevel@tonic-gate
3247c478bd9Sstevel@tonic-gate	be,a	%ncc, 1f	! branch taken if src is 64-byte aligned
3257c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d0
3267c478bd9Sstevel@tonic-gate
3277c478bd9Sstevel@tonic-gate	call	.+8		! get the address of this instruction in %o7
3287c478bd9Sstevel@tonic-gate	sll	%l6, 2, %l4
3297c478bd9Sstevel@tonic-gate	add	%o7, %l4, %o7
3307c478bd9Sstevel@tonic-gate	jmp	%o7 + 16	! jump to the starting ldd instruction
3317c478bd9Sstevel@tonic-gate	nop
3327c478bd9Sstevel@tonic-gate	ldd	[%l7+8], %d2
3337c478bd9Sstevel@tonic-gate	ldd	[%l7+16], %d4
3347c478bd9Sstevel@tonic-gate	ldd	[%l7+24], %d6
3357c478bd9Sstevel@tonic-gate	ldd	[%l7+32], %d8
3367c478bd9Sstevel@tonic-gate	ldd	[%l7+40], %d10
3377c478bd9Sstevel@tonic-gate	ldd	[%l7+48], %d12
3387c478bd9Sstevel@tonic-gate	ldd	[%l7+56], %d14
3397c478bd9Sstevel@tonic-gate1:
3407c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
3417c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d16
3427c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
3437c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d32
3447c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
3457c478bd9Sstevel@tonic-gate	sub	%i3, 128, %i3
3467c478bd9Sstevel@tonic-gate
3477c478bd9Sstevel@tonic-gate
3487c478bd9Sstevel@tonic-gate        ! switch statement to get us to the right 8 byte blk within a
3497c478bd9Sstevel@tonic-gate        ! 64 byte block
3507c478bd9Sstevel@tonic-gate
3517c478bd9Sstevel@tonic-gate	cmp	 %l6, 4
3527c478bd9Sstevel@tonic-gate	bgeu,a	 hlf
3537c478bd9Sstevel@tonic-gate	cmp	 %l6, 6
3547c478bd9Sstevel@tonic-gate	cmp	 %l6, 2
3557c478bd9Sstevel@tonic-gate	bgeu,a	 sqtr
3567c478bd9Sstevel@tonic-gate	nop
3577c478bd9Sstevel@tonic-gate	cmp	 %l6, 1
3587c478bd9Sstevel@tonic-gate	be,a	 seg1
3597c478bd9Sstevel@tonic-gate	nop
3607c478bd9Sstevel@tonic-gate	ba	 seg0
3617c478bd9Sstevel@tonic-gate	nop
3627c478bd9Sstevel@tonic-gatesqtr:
3637c478bd9Sstevel@tonic-gate	be,a	 seg2
3647c478bd9Sstevel@tonic-gate	nop
3657c478bd9Sstevel@tonic-gate	ba,a	 seg3
3667c478bd9Sstevel@tonic-gate	nop
3677c478bd9Sstevel@tonic-gate
3687c478bd9Sstevel@tonic-gatehlf:
3697c478bd9Sstevel@tonic-gate	bgeu,a	 fqtr
3707c478bd9Sstevel@tonic-gate	nop
3717c478bd9Sstevel@tonic-gate	cmp	 %l6, 5
3727c478bd9Sstevel@tonic-gate	be,a	 seg5
3737c478bd9Sstevel@tonic-gate	nop
3747c478bd9Sstevel@tonic-gate	ba	 seg4
3757c478bd9Sstevel@tonic-gate	nop
3767c478bd9Sstevel@tonic-gatefqtr:
3777c478bd9Sstevel@tonic-gate	be,a	 seg6
3787c478bd9Sstevel@tonic-gate	nop
3797c478bd9Sstevel@tonic-gate	ba	 seg7
3807c478bd9Sstevel@tonic-gate	nop
3817c478bd9Sstevel@tonic-gate
3827c478bd9Sstevel@tonic-gate#define	FALIGN_D0			\
3837c478bd9Sstevel@tonic-gate	faligndata %d0, %d2, %d48	;\
3847c478bd9Sstevel@tonic-gate	faligndata %d2, %d4, %d50	;\
3857c478bd9Sstevel@tonic-gate	faligndata %d4, %d6, %d52	;\
3867c478bd9Sstevel@tonic-gate	faligndata %d6, %d8, %d54	;\
3877c478bd9Sstevel@tonic-gate	faligndata %d8, %d10, %d56	;\
3887c478bd9Sstevel@tonic-gate	faligndata %d10, %d12, %d58	;\
3897c478bd9Sstevel@tonic-gate	faligndata %d12, %d14, %d60	;\
3907c478bd9Sstevel@tonic-gate	faligndata %d14, %d16, %d62
3917c478bd9Sstevel@tonic-gate
3927c478bd9Sstevel@tonic-gate#define	FALIGN_D16			\
3937c478bd9Sstevel@tonic-gate	faligndata %d16, %d18, %d48	;\
3947c478bd9Sstevel@tonic-gate	faligndata %d18, %d20, %d50	;\
3957c478bd9Sstevel@tonic-gate	faligndata %d20, %d22, %d52	;\
3967c478bd9Sstevel@tonic-gate	faligndata %d22, %d24, %d54	;\
3977c478bd9Sstevel@tonic-gate	faligndata %d24, %d26, %d56	;\
3987c478bd9Sstevel@tonic-gate	faligndata %d26, %d28, %d58	;\
3997c478bd9Sstevel@tonic-gate	faligndata %d28, %d30, %d60	;\
4007c478bd9Sstevel@tonic-gate	faligndata %d30, %d32, %d62
4017c478bd9Sstevel@tonic-gate
4027c478bd9Sstevel@tonic-gate#define	FALIGN_D32			\
4037c478bd9Sstevel@tonic-gate	faligndata %d32, %d34, %d48	;\
4047c478bd9Sstevel@tonic-gate	faligndata %d34, %d36, %d50	;\
4057c478bd9Sstevel@tonic-gate	faligndata %d36, %d38, %d52	;\
4067c478bd9Sstevel@tonic-gate	faligndata %d38, %d40, %d54	;\
4077c478bd9Sstevel@tonic-gate	faligndata %d40, %d42, %d56	;\
4087c478bd9Sstevel@tonic-gate	faligndata %d42, %d44, %d58	;\
4097c478bd9Sstevel@tonic-gate	faligndata %d44, %d46, %d60	;\
4107c478bd9Sstevel@tonic-gate	faligndata %d46, %d0, %d62
4117c478bd9Sstevel@tonic-gate
4127c478bd9Sstevel@tonic-gateseg0:
4137c478bd9Sstevel@tonic-gate	! 1st chunk - %d0 low, %d16 high, %d32 pre, %d48 dst
4147c478bd9Sstevel@tonic-gate	FALIGN_D0
4157c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d0
4167c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
4177c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
4187c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
4197c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 0f
4207c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
4217c478bd9Sstevel@tonic-gate	! 2nd chunk -  %d0 pre, %d16 low, %d32 high, %d48 dst
4227c478bd9Sstevel@tonic-gate	FALIGN_D16
4237c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d16
4247c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
4257c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
4267c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
4277c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 1f
4287c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
4297c478bd9Sstevel@tonic-gate	! 3rd chunk -  %d0 high, %d16 pre, %d32 low, %d48 dst
4307c478bd9Sstevel@tonic-gate	FALIGN_D32
4317c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d32
4327c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
4337c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
4347c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
4357c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 2f
4367c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
4377c478bd9Sstevel@tonic-gate	ba,a,pt	%ncc, seg0
4387c478bd9Sstevel@tonic-gate
4397c478bd9Sstevel@tonic-gate0:
4407c478bd9Sstevel@tonic-gate	FALIGN_D16
4417c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
4427c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
4437c478bd9Sstevel@tonic-gate	membar	#Sync
4447c478bd9Sstevel@tonic-gate	FALIGN_D32
4457c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
4467c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd0
4477c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
4487c478bd9Sstevel@tonic-gate
4497c478bd9Sstevel@tonic-gate1:
4507c478bd9Sstevel@tonic-gate	FALIGN_D32
4517c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
4527c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
4537c478bd9Sstevel@tonic-gate	membar	#Sync
4547c478bd9Sstevel@tonic-gate	FALIGN_D0
4557c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
4567c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd16
4577c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
4587c478bd9Sstevel@tonic-gate
4597c478bd9Sstevel@tonic-gate2:
4607c478bd9Sstevel@tonic-gate	FALIGN_D0
4617c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
4627c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
4637c478bd9Sstevel@tonic-gate	membar	#Sync
4647c478bd9Sstevel@tonic-gate	FALIGN_D16
4657c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
4667c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd32
4677c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
4687c478bd9Sstevel@tonic-gate
4697c478bd9Sstevel@tonic-gate
4707c478bd9Sstevel@tonic-gate#define	FALIGN_D2			\
4717c478bd9Sstevel@tonic-gate	faligndata %d2, %d4, %d48	;\
4727c478bd9Sstevel@tonic-gate	faligndata %d4, %d6, %d50	;\
4737c478bd9Sstevel@tonic-gate	faligndata %d6, %d8, %d52	;\
4747c478bd9Sstevel@tonic-gate	faligndata %d8, %d10, %d54	;\
4757c478bd9Sstevel@tonic-gate	faligndata %d10, %d12, %d56	;\
4767c478bd9Sstevel@tonic-gate	faligndata %d12, %d14, %d58	;\
4777c478bd9Sstevel@tonic-gate	faligndata %d14, %d16, %d60	;\
4787c478bd9Sstevel@tonic-gate	faligndata %d16, %d18, %d62
4797c478bd9Sstevel@tonic-gate
4807c478bd9Sstevel@tonic-gate#define	FALIGN_D18			\
4817c478bd9Sstevel@tonic-gate	faligndata %d18, %d20, %d48	;\
4827c478bd9Sstevel@tonic-gate	faligndata %d20, %d22, %d50	;\
4837c478bd9Sstevel@tonic-gate	faligndata %d22, %d24, %d52	;\
4847c478bd9Sstevel@tonic-gate	faligndata %d24, %d26, %d54	;\
4857c478bd9Sstevel@tonic-gate	faligndata %d26, %d28, %d56	;\
4867c478bd9Sstevel@tonic-gate	faligndata %d28, %d30, %d58	;\
4877c478bd9Sstevel@tonic-gate	faligndata %d30, %d32, %d60	;\
4887c478bd9Sstevel@tonic-gate	faligndata %d32, %d34, %d62
4897c478bd9Sstevel@tonic-gate
4907c478bd9Sstevel@tonic-gate#define	FALIGN_D34			\
4917c478bd9Sstevel@tonic-gate	faligndata %d34, %d36, %d48	;\
4927c478bd9Sstevel@tonic-gate	faligndata %d36, %d38, %d50	;\
4937c478bd9Sstevel@tonic-gate	faligndata %d38, %d40, %d52	;\
4947c478bd9Sstevel@tonic-gate	faligndata %d40, %d42, %d54	;\
4957c478bd9Sstevel@tonic-gate	faligndata %d42, %d44, %d56	;\
4967c478bd9Sstevel@tonic-gate	faligndata %d44, %d46, %d58	;\
4977c478bd9Sstevel@tonic-gate	faligndata %d46, %d0, %d60	;\
4987c478bd9Sstevel@tonic-gate	faligndata %d0, %d2, %d62
4997c478bd9Sstevel@tonic-gate
5007c478bd9Sstevel@tonic-gateseg1:
5017c478bd9Sstevel@tonic-gate	! 1st chunk - %d0 low, %d16 high, %d32 pre, %d48 dst
5027c478bd9Sstevel@tonic-gate	FALIGN_D2
5037c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d0
5047c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
5057c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
5067c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
5077c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 0f
5087c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
5097c478bd9Sstevel@tonic-gate	! 2nd chunk -  %d0 pre, %d16 low, %d32 high, %d48 dst
5107c478bd9Sstevel@tonic-gate	FALIGN_D18
5117c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d16
5127c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
5137c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
5147c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
5157c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 1f
5167c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
5177c478bd9Sstevel@tonic-gate	! 3rd chunk -  %d0 high, %d16 pre, %d32 low, %d48 dst
5187c478bd9Sstevel@tonic-gate	FALIGN_D34
5197c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d32
5207c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
5217c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
5227c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
5237c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 2f
5247c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
5257c478bd9Sstevel@tonic-gate	ba,a,pt	%ncc, seg1
5267c478bd9Sstevel@tonic-gate0:
5277c478bd9Sstevel@tonic-gate	FALIGN_D18
5287c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
5297c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
5307c478bd9Sstevel@tonic-gate	membar	#Sync
5317c478bd9Sstevel@tonic-gate	FALIGN_D34
5327c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
5337c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd2
5347c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
5357c478bd9Sstevel@tonic-gate
5367c478bd9Sstevel@tonic-gate1:
5377c478bd9Sstevel@tonic-gate	FALIGN_D34
5387c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
5397c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
5407c478bd9Sstevel@tonic-gate	membar	#Sync
5417c478bd9Sstevel@tonic-gate	FALIGN_D2
5427c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
5437c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd18
5447c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
5457c478bd9Sstevel@tonic-gate
5467c478bd9Sstevel@tonic-gate2:
5477c478bd9Sstevel@tonic-gate	FALIGN_D2
5487c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
5497c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
5507c478bd9Sstevel@tonic-gate	membar	#Sync
5517c478bd9Sstevel@tonic-gate	FALIGN_D18
5527c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
5537c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd34
5547c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
5557c478bd9Sstevel@tonic-gate
5567c478bd9Sstevel@tonic-gate#define	FALIGN_D4			\
5577c478bd9Sstevel@tonic-gate	faligndata %d4, %d6, %d48	;\
5587c478bd9Sstevel@tonic-gate	faligndata %d6, %d8, %d50	;\
5597c478bd9Sstevel@tonic-gate	faligndata %d8, %d10, %d52	;\
5607c478bd9Sstevel@tonic-gate	faligndata %d10, %d12, %d54	;\
5617c478bd9Sstevel@tonic-gate	faligndata %d12, %d14, %d56	;\
5627c478bd9Sstevel@tonic-gate	faligndata %d14, %d16, %d58	;\
5637c478bd9Sstevel@tonic-gate	faligndata %d16, %d18, %d60	;\
5647c478bd9Sstevel@tonic-gate	faligndata %d18, %d20, %d62
5657c478bd9Sstevel@tonic-gate
5667c478bd9Sstevel@tonic-gate#define	FALIGN_D20			\
5677c478bd9Sstevel@tonic-gate	faligndata %d20, %d22, %d48	;\
5687c478bd9Sstevel@tonic-gate	faligndata %d22, %d24, %d50	;\
5697c478bd9Sstevel@tonic-gate	faligndata %d24, %d26, %d52	;\
5707c478bd9Sstevel@tonic-gate	faligndata %d26, %d28, %d54	;\
5717c478bd9Sstevel@tonic-gate	faligndata %d28, %d30, %d56	;\
5727c478bd9Sstevel@tonic-gate	faligndata %d30, %d32, %d58	;\
5737c478bd9Sstevel@tonic-gate	faligndata %d32, %d34, %d60	;\
5747c478bd9Sstevel@tonic-gate	faligndata %d34, %d36, %d62
5757c478bd9Sstevel@tonic-gate
5767c478bd9Sstevel@tonic-gate#define	FALIGN_D36			\
5777c478bd9Sstevel@tonic-gate	faligndata %d36, %d38, %d48	;\
5787c478bd9Sstevel@tonic-gate	faligndata %d38, %d40, %d50	;\
5797c478bd9Sstevel@tonic-gate	faligndata %d40, %d42, %d52	;\
5807c478bd9Sstevel@tonic-gate	faligndata %d42, %d44, %d54	;\
5817c478bd9Sstevel@tonic-gate	faligndata %d44, %d46, %d56	;\
5827c478bd9Sstevel@tonic-gate	faligndata %d46, %d0, %d58	;\
5837c478bd9Sstevel@tonic-gate	faligndata %d0, %d2, %d60	;\
5847c478bd9Sstevel@tonic-gate	faligndata %d2, %d4, %d62
5857c478bd9Sstevel@tonic-gate
5867c478bd9Sstevel@tonic-gateseg2:
5877c478bd9Sstevel@tonic-gate	! 1st chunk - %d0 low, %d16 high, %d32 pre, %d48 dst
5887c478bd9Sstevel@tonic-gate	FALIGN_D4
5897c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d0
5907c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
5917c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
5927c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
5937c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 0f
5947c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
5957c478bd9Sstevel@tonic-gate	! 2nd chunk -  %d0 pre, %d16 low, %d32 high, %d48 dst
5967c478bd9Sstevel@tonic-gate	FALIGN_D20
5977c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d16
5987c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
5997c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
6007c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
6017c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 1f
6027c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
6037c478bd9Sstevel@tonic-gate	! 3rd chunk -  %d0 high, %d16 pre, %d32 low, %d48 dst
6047c478bd9Sstevel@tonic-gate	FALIGN_D36
6057c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d32
6067c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
6077c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
6087c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
6097c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 2f
6107c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
6117c478bd9Sstevel@tonic-gate	ba,a,pt	%ncc, seg2
6127c478bd9Sstevel@tonic-gate
6137c478bd9Sstevel@tonic-gate0:
6147c478bd9Sstevel@tonic-gate	FALIGN_D20
6157c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
6167c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
6177c478bd9Sstevel@tonic-gate	membar	#Sync
6187c478bd9Sstevel@tonic-gate	FALIGN_D36
6197c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
6207c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd4
6217c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
6227c478bd9Sstevel@tonic-gate
6237c478bd9Sstevel@tonic-gate1:
6247c478bd9Sstevel@tonic-gate	FALIGN_D36
6257c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
6267c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
6277c478bd9Sstevel@tonic-gate	membar	#Sync
6287c478bd9Sstevel@tonic-gate	FALIGN_D4
6297c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
6307c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd20
6317c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
6327c478bd9Sstevel@tonic-gate
6337c478bd9Sstevel@tonic-gate2:
6347c478bd9Sstevel@tonic-gate	FALIGN_D4
6357c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
6367c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
6377c478bd9Sstevel@tonic-gate	membar	#Sync
6387c478bd9Sstevel@tonic-gate	FALIGN_D20
6397c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
6407c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd36
6417c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
6427c478bd9Sstevel@tonic-gate
6437c478bd9Sstevel@tonic-gate
6447c478bd9Sstevel@tonic-gate#define	FALIGN_D6			\
6457c478bd9Sstevel@tonic-gate	faligndata %d6, %d8, %d48	;\
6467c478bd9Sstevel@tonic-gate	faligndata %d8, %d10, %d50	;\
6477c478bd9Sstevel@tonic-gate	faligndata %d10, %d12, %d52	;\
6487c478bd9Sstevel@tonic-gate	faligndata %d12, %d14, %d54	;\
6497c478bd9Sstevel@tonic-gate	faligndata %d14, %d16, %d56	;\
6507c478bd9Sstevel@tonic-gate	faligndata %d16, %d18, %d58	;\
6517c478bd9Sstevel@tonic-gate	faligndata %d18, %d20, %d60	;\
6527c478bd9Sstevel@tonic-gate	faligndata %d20, %d22, %d62
6537c478bd9Sstevel@tonic-gate
6547c478bd9Sstevel@tonic-gate#define	FALIGN_D22			\
6557c478bd9Sstevel@tonic-gate	faligndata %d22, %d24, %d48	;\
6567c478bd9Sstevel@tonic-gate	faligndata %d24, %d26, %d50	;\
6577c478bd9Sstevel@tonic-gate	faligndata %d26, %d28, %d52	;\
6587c478bd9Sstevel@tonic-gate	faligndata %d28, %d30, %d54	;\
6597c478bd9Sstevel@tonic-gate	faligndata %d30, %d32, %d56	;\
6607c478bd9Sstevel@tonic-gate	faligndata %d32, %d34, %d58	;\
6617c478bd9Sstevel@tonic-gate	faligndata %d34, %d36, %d60	;\
6627c478bd9Sstevel@tonic-gate	faligndata %d36, %d38, %d62
6637c478bd9Sstevel@tonic-gate
6647c478bd9Sstevel@tonic-gate#define	FALIGN_D38			\
6657c478bd9Sstevel@tonic-gate	faligndata %d38, %d40, %d48	;\
6667c478bd9Sstevel@tonic-gate	faligndata %d40, %d42, %d50	;\
6677c478bd9Sstevel@tonic-gate	faligndata %d42, %d44, %d52	;\
6687c478bd9Sstevel@tonic-gate	faligndata %d44, %d46, %d54	;\
6697c478bd9Sstevel@tonic-gate	faligndata %d46, %d0, %d56	;\
6707c478bd9Sstevel@tonic-gate	faligndata %d0, %d2, %d58	;\
6717c478bd9Sstevel@tonic-gate	faligndata %d2, %d4, %d60	;\
6727c478bd9Sstevel@tonic-gate	faligndata %d4, %d6, %d62
6737c478bd9Sstevel@tonic-gate
6747c478bd9Sstevel@tonic-gateseg3:
6757c478bd9Sstevel@tonic-gate	! 1st chunk - %d0 low, %d16 high, %d32 pre, %d48 dst
6767c478bd9Sstevel@tonic-gate	FALIGN_D6
6777c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d0
6787c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
6797c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
6807c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
6817c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 0f
6827c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
6837c478bd9Sstevel@tonic-gate	! 2nd chunk -  %d0 pre, %d16 low, %d32 high, %d48 dst
6847c478bd9Sstevel@tonic-gate	FALIGN_D22
6857c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d16
6867c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
6877c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
6887c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
6897c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 1f
6907c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
6917c478bd9Sstevel@tonic-gate	! 3rd chunk -  %d0 high, %d16 pre, %d32 low, %d48 dst
6927c478bd9Sstevel@tonic-gate	FALIGN_D38
6937c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d32
6947c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
6957c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
6967c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
6977c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 2f
6987c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
6997c478bd9Sstevel@tonic-gate	ba,a,pt	%ncc, seg3
7007c478bd9Sstevel@tonic-gate
7017c478bd9Sstevel@tonic-gate0:
7027c478bd9Sstevel@tonic-gate	FALIGN_D22
7037c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
7047c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
7057c478bd9Sstevel@tonic-gate	membar	#Sync
7067c478bd9Sstevel@tonic-gate	FALIGN_D38
7077c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
7087c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd6
7097c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
7107c478bd9Sstevel@tonic-gate
7117c478bd9Sstevel@tonic-gate1:
7127c478bd9Sstevel@tonic-gate	FALIGN_D38
7137c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
7147c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
7157c478bd9Sstevel@tonic-gate	membar	#Sync
7167c478bd9Sstevel@tonic-gate	FALIGN_D6
7177c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
7187c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd22
7197c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
7207c478bd9Sstevel@tonic-gate
7217c478bd9Sstevel@tonic-gate2:
7227c478bd9Sstevel@tonic-gate	FALIGN_D6
7237c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
7247c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
7257c478bd9Sstevel@tonic-gate	membar	#Sync
7267c478bd9Sstevel@tonic-gate	FALIGN_D22
7277c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
7287c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd38
7297c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
7307c478bd9Sstevel@tonic-gate
7317c478bd9Sstevel@tonic-gate
7327c478bd9Sstevel@tonic-gate#define	FALIGN_D8			\
7337c478bd9Sstevel@tonic-gate	faligndata %d8, %d10, %d48	;\
7347c478bd9Sstevel@tonic-gate	faligndata %d10, %d12, %d50	;\
7357c478bd9Sstevel@tonic-gate	faligndata %d12, %d14, %d52	;\
7367c478bd9Sstevel@tonic-gate	faligndata %d14, %d16, %d54	;\
7377c478bd9Sstevel@tonic-gate	faligndata %d16, %d18, %d56	;\
7387c478bd9Sstevel@tonic-gate	faligndata %d18, %d20, %d58	;\
7397c478bd9Sstevel@tonic-gate	faligndata %d20, %d22, %d60	;\
7407c478bd9Sstevel@tonic-gate	faligndata %d22, %d24, %d62
7417c478bd9Sstevel@tonic-gate
7427c478bd9Sstevel@tonic-gate#define	FALIGN_D24			\
7437c478bd9Sstevel@tonic-gate	faligndata %d24, %d26, %d48	;\
7447c478bd9Sstevel@tonic-gate	faligndata %d26, %d28, %d50	;\
7457c478bd9Sstevel@tonic-gate	faligndata %d28, %d30, %d52	;\
7467c478bd9Sstevel@tonic-gate	faligndata %d30, %d32, %d54	;\
7477c478bd9Sstevel@tonic-gate	faligndata %d32, %d34, %d56	;\
7487c478bd9Sstevel@tonic-gate	faligndata %d34, %d36, %d58	;\
7497c478bd9Sstevel@tonic-gate	faligndata %d36, %d38, %d60	;\
7507c478bd9Sstevel@tonic-gate	faligndata %d38, %d40, %d62
7517c478bd9Sstevel@tonic-gate
7527c478bd9Sstevel@tonic-gate#define	FALIGN_D40			\
7537c478bd9Sstevel@tonic-gate	faligndata %d40, %d42, %d48	;\
7547c478bd9Sstevel@tonic-gate	faligndata %d42, %d44, %d50	;\
7557c478bd9Sstevel@tonic-gate	faligndata %d44, %d46, %d52	;\
7567c478bd9Sstevel@tonic-gate	faligndata %d46, %d0, %d54	;\
7577c478bd9Sstevel@tonic-gate	faligndata %d0, %d2, %d56	;\
7587c478bd9Sstevel@tonic-gate	faligndata %d2, %d4, %d58	;\
7597c478bd9Sstevel@tonic-gate	faligndata %d4, %d6, %d60	;\
7607c478bd9Sstevel@tonic-gate	faligndata %d6, %d8, %d62
7617c478bd9Sstevel@tonic-gate
7627c478bd9Sstevel@tonic-gateseg4:
7637c478bd9Sstevel@tonic-gate	! 1st chunk - %d0 low, %d16 high, %d32 pre, %d48 dst
7647c478bd9Sstevel@tonic-gate	FALIGN_D8
7657c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d0
7667c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
7677c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
7687c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
7697c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 0f
7707c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
7717c478bd9Sstevel@tonic-gate	! 2nd chunk -  %d0 pre, %d16 low, %d32 high, %d48 dst
7727c478bd9Sstevel@tonic-gate	FALIGN_D24
7737c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d16
7747c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
7757c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
7767c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
7777c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 1f
7787c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
7797c478bd9Sstevel@tonic-gate	! 3rd chunk -  %d0 high, %d16 pre, %d32 low, %d48 dst
7807c478bd9Sstevel@tonic-gate	FALIGN_D40
7817c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d32
7827c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
7837c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
7847c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
7857c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 2f
7867c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
7877c478bd9Sstevel@tonic-gate	ba,a,pt	%ncc, seg4
7887c478bd9Sstevel@tonic-gate
7897c478bd9Sstevel@tonic-gate0:
7907c478bd9Sstevel@tonic-gate	FALIGN_D24
7917c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
7927c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
7937c478bd9Sstevel@tonic-gate	membar	#Sync
7947c478bd9Sstevel@tonic-gate	FALIGN_D40
7957c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
7967c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd8
7977c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
7987c478bd9Sstevel@tonic-gate
7997c478bd9Sstevel@tonic-gate1:
8007c478bd9Sstevel@tonic-gate	FALIGN_D40
8017c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
8027c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
8037c478bd9Sstevel@tonic-gate	membar	#Sync
8047c478bd9Sstevel@tonic-gate	FALIGN_D8
8057c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
8067c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd24
8077c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
8087c478bd9Sstevel@tonic-gate
8097c478bd9Sstevel@tonic-gate2:
8107c478bd9Sstevel@tonic-gate	FALIGN_D8
8117c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
8127c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
8137c478bd9Sstevel@tonic-gate	membar	#Sync
8147c478bd9Sstevel@tonic-gate	FALIGN_D24
8157c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
8167c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd40
8177c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
8187c478bd9Sstevel@tonic-gate
8197c478bd9Sstevel@tonic-gate
8207c478bd9Sstevel@tonic-gate#define	FALIGN_D10			\
8217c478bd9Sstevel@tonic-gate	faligndata %d10, %d12, %d48	;\
8227c478bd9Sstevel@tonic-gate	faligndata %d12, %d14, %d50	;\
8237c478bd9Sstevel@tonic-gate	faligndata %d14, %d16, %d52	;\
8247c478bd9Sstevel@tonic-gate	faligndata %d16, %d18, %d54	;\
8257c478bd9Sstevel@tonic-gate	faligndata %d18, %d20, %d56	;\
8267c478bd9Sstevel@tonic-gate	faligndata %d20, %d22, %d58	;\
8277c478bd9Sstevel@tonic-gate	faligndata %d22, %d24, %d60	;\
8287c478bd9Sstevel@tonic-gate	faligndata %d24, %d26, %d62
8297c478bd9Sstevel@tonic-gate
8307c478bd9Sstevel@tonic-gate#define	FALIGN_D26			\
8317c478bd9Sstevel@tonic-gate	faligndata %d26, %d28, %d48	;\
8327c478bd9Sstevel@tonic-gate	faligndata %d28, %d30, %d50	;\
8337c478bd9Sstevel@tonic-gate	faligndata %d30, %d32, %d52	;\
8347c478bd9Sstevel@tonic-gate	faligndata %d32, %d34, %d54	;\
8357c478bd9Sstevel@tonic-gate	faligndata %d34, %d36, %d56	;\
8367c478bd9Sstevel@tonic-gate	faligndata %d36, %d38, %d58	;\
8377c478bd9Sstevel@tonic-gate	faligndata %d38, %d40, %d60	;\
8387c478bd9Sstevel@tonic-gate	faligndata %d40, %d42, %d62
8397c478bd9Sstevel@tonic-gate
8407c478bd9Sstevel@tonic-gate#define	FALIGN_D42			\
8417c478bd9Sstevel@tonic-gate	faligndata %d42, %d44, %d48	;\
8427c478bd9Sstevel@tonic-gate	faligndata %d44, %d46, %d50	;\
8437c478bd9Sstevel@tonic-gate	faligndata %d46, %d0, %d52	;\
8447c478bd9Sstevel@tonic-gate	faligndata %d0, %d2, %d54	;\
8457c478bd9Sstevel@tonic-gate	faligndata %d2, %d4, %d56	;\
8467c478bd9Sstevel@tonic-gate	faligndata %d4, %d6, %d58	;\
8477c478bd9Sstevel@tonic-gate	faligndata %d6, %d8, %d60	;\
8487c478bd9Sstevel@tonic-gate	faligndata %d8, %d10, %d62
8497c478bd9Sstevel@tonic-gate
8507c478bd9Sstevel@tonic-gateseg5:
8517c478bd9Sstevel@tonic-gate	! 1st chunk - %d0 low, %d16 high, %d32 pre, %d48 dst
8527c478bd9Sstevel@tonic-gate	FALIGN_D10
8537c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d0
8547c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
8557c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
8567c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
8577c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 0f
8587c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
8597c478bd9Sstevel@tonic-gate	! 2nd chunk -  %d0 pre, %d16 low, %d32 high, %d48 dst
8607c478bd9Sstevel@tonic-gate	FALIGN_D26
8617c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d16
8627c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
8637c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
8647c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
8657c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 1f
8667c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
8677c478bd9Sstevel@tonic-gate	! 3rd chunk -  %d0 high, %d16 pre, %d32 low, %d48 dst
8687c478bd9Sstevel@tonic-gate	FALIGN_D42
8697c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d32
8707c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
8717c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
8727c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
8737c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 2f
8747c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
8757c478bd9Sstevel@tonic-gate	ba,a,pt	%ncc, seg5
8767c478bd9Sstevel@tonic-gate
8777c478bd9Sstevel@tonic-gate0:
8787c478bd9Sstevel@tonic-gate	FALIGN_D26
8797c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
8807c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
8817c478bd9Sstevel@tonic-gate	membar	#Sync
8827c478bd9Sstevel@tonic-gate	FALIGN_D42
8837c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
8847c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd10
8857c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
8867c478bd9Sstevel@tonic-gate
8877c478bd9Sstevel@tonic-gate1:
8887c478bd9Sstevel@tonic-gate	FALIGN_D42
8897c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
8907c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
8917c478bd9Sstevel@tonic-gate	membar	#Sync
8927c478bd9Sstevel@tonic-gate	FALIGN_D10
8937c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
8947c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd26
8957c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
8967c478bd9Sstevel@tonic-gate
8977c478bd9Sstevel@tonic-gate2:
8987c478bd9Sstevel@tonic-gate	FALIGN_D10
8997c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
9007c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
9017c478bd9Sstevel@tonic-gate	membar	#Sync
9027c478bd9Sstevel@tonic-gate	FALIGN_D26
9037c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
9047c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd42
9057c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
9067c478bd9Sstevel@tonic-gate
9077c478bd9Sstevel@tonic-gate
9087c478bd9Sstevel@tonic-gate#define	FALIGN_D12			\
9097c478bd9Sstevel@tonic-gate	faligndata %d12, %d14, %d48	;\
9107c478bd9Sstevel@tonic-gate	faligndata %d14, %d16, %d50	;\
9117c478bd9Sstevel@tonic-gate	faligndata %d16, %d18, %d52	;\
9127c478bd9Sstevel@tonic-gate	faligndata %d18, %d20, %d54	;\
9137c478bd9Sstevel@tonic-gate	faligndata %d20, %d22, %d56	;\
9147c478bd9Sstevel@tonic-gate	faligndata %d22, %d24, %d58	;\
9157c478bd9Sstevel@tonic-gate	faligndata %d24, %d26, %d60	;\
9167c478bd9Sstevel@tonic-gate	faligndata %d26, %d28, %d62
9177c478bd9Sstevel@tonic-gate
9187c478bd9Sstevel@tonic-gate#define	FALIGN_D28			\
9197c478bd9Sstevel@tonic-gate	faligndata %d28, %d30, %d48	;\
9207c478bd9Sstevel@tonic-gate	faligndata %d30, %d32, %d50	;\
9217c478bd9Sstevel@tonic-gate	faligndata %d32, %d34, %d52	;\
9227c478bd9Sstevel@tonic-gate	faligndata %d34, %d36, %d54	;\
9237c478bd9Sstevel@tonic-gate	faligndata %d36, %d38, %d56	;\
9247c478bd9Sstevel@tonic-gate	faligndata %d38, %d40, %d58	;\
9257c478bd9Sstevel@tonic-gate	faligndata %d40, %d42, %d60	;\
9267c478bd9Sstevel@tonic-gate	faligndata %d42, %d44, %d62
9277c478bd9Sstevel@tonic-gate
9287c478bd9Sstevel@tonic-gate#define	FALIGN_D44			\
9297c478bd9Sstevel@tonic-gate	faligndata %d44, %d46, %d48	;\
9307c478bd9Sstevel@tonic-gate	faligndata %d46, %d0, %d50	;\
9317c478bd9Sstevel@tonic-gate	faligndata %d0, %d2, %d52	;\
9327c478bd9Sstevel@tonic-gate	faligndata %d2, %d4, %d54	;\
9337c478bd9Sstevel@tonic-gate	faligndata %d4, %d6, %d56	;\
9347c478bd9Sstevel@tonic-gate	faligndata %d6, %d8, %d58	;\
9357c478bd9Sstevel@tonic-gate	faligndata %d8, %d10, %d60	;\
9367c478bd9Sstevel@tonic-gate	faligndata %d10, %d12, %d62
9377c478bd9Sstevel@tonic-gate
9387c478bd9Sstevel@tonic-gateseg6:
9397c478bd9Sstevel@tonic-gate	! 1st chunk - %d0 low, %d16 high, %d32 pre, %d48 dst
9407c478bd9Sstevel@tonic-gate	FALIGN_D12
9417c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d0
9427c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
9437c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
9447c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
9457c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 0f
9467c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
9477c478bd9Sstevel@tonic-gate	! 2nd chunk -  %d0 pre, %d16 low, %d32 high, %d48 dst
9487c478bd9Sstevel@tonic-gate	FALIGN_D28
9497c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d16
9507c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
9517c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
9527c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
9537c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 1f
9547c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
9557c478bd9Sstevel@tonic-gate	! 3rd chunk -  %d0 high, %d16 pre, %d32 low, %d48 dst
9567c478bd9Sstevel@tonic-gate	FALIGN_D44
9577c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d32
9587c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
9597c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
9607c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
9617c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 2f
9627c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
9637c478bd9Sstevel@tonic-gate	ba,a,pt	%ncc, seg6
9647c478bd9Sstevel@tonic-gate
9657c478bd9Sstevel@tonic-gate0:
9667c478bd9Sstevel@tonic-gate	FALIGN_D28
9677c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
9687c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
9697c478bd9Sstevel@tonic-gate	membar	#Sync
9707c478bd9Sstevel@tonic-gate	FALIGN_D44
9717c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
9727c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd12
9737c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
9747c478bd9Sstevel@tonic-gate
9757c478bd9Sstevel@tonic-gate1:
9767c478bd9Sstevel@tonic-gate	FALIGN_D44
9777c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
9787c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
9797c478bd9Sstevel@tonic-gate	membar	#Sync
9807c478bd9Sstevel@tonic-gate	FALIGN_D12
9817c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
9827c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd28
9837c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
9847c478bd9Sstevel@tonic-gate
9857c478bd9Sstevel@tonic-gate2:
9867c478bd9Sstevel@tonic-gate	FALIGN_D12
9877c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
9887c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
9897c478bd9Sstevel@tonic-gate	membar	#Sync
9907c478bd9Sstevel@tonic-gate	FALIGN_D28
9917c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
9927c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd44
9937c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
9947c478bd9Sstevel@tonic-gate
9957c478bd9Sstevel@tonic-gate
9967c478bd9Sstevel@tonic-gate#define	FALIGN_D14			\
9977c478bd9Sstevel@tonic-gate	faligndata %d14, %d16, %d48	;\
9987c478bd9Sstevel@tonic-gate	faligndata %d16, %d18, %d50	;\
9997c478bd9Sstevel@tonic-gate	faligndata %d18, %d20, %d52	;\
10007c478bd9Sstevel@tonic-gate	faligndata %d20, %d22, %d54	;\
10017c478bd9Sstevel@tonic-gate	faligndata %d22, %d24, %d56	;\
10027c478bd9Sstevel@tonic-gate	faligndata %d24, %d26, %d58	;\
10037c478bd9Sstevel@tonic-gate	faligndata %d26, %d28, %d60	;\
10047c478bd9Sstevel@tonic-gate	faligndata %d28, %d30, %d62
10057c478bd9Sstevel@tonic-gate
10067c478bd9Sstevel@tonic-gate#define	FALIGN_D30			\
10077c478bd9Sstevel@tonic-gate	faligndata %d30, %d32, %d48	;\
10087c478bd9Sstevel@tonic-gate	faligndata %d32, %d34, %d50	;\
10097c478bd9Sstevel@tonic-gate	faligndata %d34, %d36, %d52	;\
10107c478bd9Sstevel@tonic-gate	faligndata %d36, %d38, %d54	;\
10117c478bd9Sstevel@tonic-gate	faligndata %d38, %d40, %d56	;\
10127c478bd9Sstevel@tonic-gate	faligndata %d40, %d42, %d58	;\
10137c478bd9Sstevel@tonic-gate	faligndata %d42, %d44, %d60	;\
10147c478bd9Sstevel@tonic-gate	faligndata %d44, %d46, %d62
10157c478bd9Sstevel@tonic-gate
10167c478bd9Sstevel@tonic-gate#define	FALIGN_D46			\
10177c478bd9Sstevel@tonic-gate	faligndata %d46, %d0, %d48	;\
10187c478bd9Sstevel@tonic-gate	faligndata %d0, %d2, %d50	;\
10197c478bd9Sstevel@tonic-gate	faligndata %d2, %d4, %d52	;\
10207c478bd9Sstevel@tonic-gate	faligndata %d4, %d6, %d54	;\
10217c478bd9Sstevel@tonic-gate	faligndata %d6, %d8, %d56	;\
10227c478bd9Sstevel@tonic-gate	faligndata %d8, %d10, %d58	;\
10237c478bd9Sstevel@tonic-gate	faligndata %d10, %d12, %d60	;\
10247c478bd9Sstevel@tonic-gate	faligndata %d12, %d14, %d62
10257c478bd9Sstevel@tonic-gate
10267c478bd9Sstevel@tonic-gateseg7:
10277c478bd9Sstevel@tonic-gate	! 1st chunk - %d0 low, %d16 high, %d32 pre, %d48 dst
10287c478bd9Sstevel@tonic-gate	FALIGN_D14
10297c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d0
10307c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
10317c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
10327c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
10337c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 0f
10347c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
10357c478bd9Sstevel@tonic-gate	! 2nd chunk -  %d0 pre, %d16 low, %d32 high, %d48 dst
10367c478bd9Sstevel@tonic-gate	FALIGN_D30
10377c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d16
10387c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
10397c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
10407c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
10417c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 1f
10427c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
10437c478bd9Sstevel@tonic-gate	! 3rd chunk -  %d0 high, %d16 pre, %d32 low, %d48 dst
10447c478bd9Sstevel@tonic-gate	FALIGN_D46
10457c478bd9Sstevel@tonic-gate	ldda	[%l7]ASI_BLK_P, %d32
10467c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
10477c478bd9Sstevel@tonic-gate	add	%l7, 64, %l7
10487c478bd9Sstevel@tonic-gate	subcc	%i3, 64, %i3
10497c478bd9Sstevel@tonic-gate	bz,pn	%ncc, 2f
10507c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
10517c478bd9Sstevel@tonic-gate	ba,a,pt	%ncc, seg7
10527c478bd9Sstevel@tonic-gate
10537c478bd9Sstevel@tonic-gate0:
10547c478bd9Sstevel@tonic-gate	FALIGN_D30
10557c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
10567c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
10577c478bd9Sstevel@tonic-gate	membar	#Sync
10587c478bd9Sstevel@tonic-gate	FALIGN_D46
10597c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
10607c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd14
10617c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
10627c478bd9Sstevel@tonic-gate
10637c478bd9Sstevel@tonic-gate1:
10647c478bd9Sstevel@tonic-gate	FALIGN_D46
10657c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
10667c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
10677c478bd9Sstevel@tonic-gate	membar	#Sync
10687c478bd9Sstevel@tonic-gate	FALIGN_D14
10697c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
10707c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd30
10717c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
10727c478bd9Sstevel@tonic-gate
10737c478bd9Sstevel@tonic-gate2:
10747c478bd9Sstevel@tonic-gate	FALIGN_D14
10757c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
10767c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
10777c478bd9Sstevel@tonic-gate	membar	#Sync
10787c478bd9Sstevel@tonic-gate	FALIGN_D30
10797c478bd9Sstevel@tonic-gate	stda	%d48, [%i0]ASI_BLK_P
10807c478bd9Sstevel@tonic-gate	ba,pt	%ncc, blkd46
10817c478bd9Sstevel@tonic-gate	add	%i0, 64, %i0
10827c478bd9Sstevel@tonic-gate
10837c478bd9Sstevel@tonic-gate
10847c478bd9Sstevel@tonic-gate	!
10857c478bd9Sstevel@tonic-gate	! dribble out the last partial block
10867c478bd9Sstevel@tonic-gate	!
10877c478bd9Sstevel@tonic-gateblkd0:
10887c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
10897c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
10907c478bd9Sstevel@tonic-gate	faligndata %d0, %d2, %d48
10917c478bd9Sstevel@tonic-gate	std	%d48, [%i0]
10927c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
10937c478bd9Sstevel@tonic-gateblkd2:
10947c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
10957c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
10967c478bd9Sstevel@tonic-gate	faligndata %d2, %d4, %d48
10977c478bd9Sstevel@tonic-gate	std	%d48, [%i0]
10987c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
10997c478bd9Sstevel@tonic-gateblkd4:
11007c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
11017c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
11027c478bd9Sstevel@tonic-gate	faligndata %d4, %d6, %d48
11037c478bd9Sstevel@tonic-gate	std	%d48, [%i0]
11047c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
11057c478bd9Sstevel@tonic-gateblkd6:
11067c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
11077c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
11087c478bd9Sstevel@tonic-gate	faligndata %d6, %d8, %d48
11097c478bd9Sstevel@tonic-gate	std	%d48, [%i0]
11107c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
11117c478bd9Sstevel@tonic-gateblkd8:
11127c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
11137c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
11147c478bd9Sstevel@tonic-gate	faligndata %d8, %d10, %d48
11157c478bd9Sstevel@tonic-gate	std	%d48, [%i0]
11167c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
11177c478bd9Sstevel@tonic-gateblkd10:
11187c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
11197c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
11207c478bd9Sstevel@tonic-gate	faligndata %d10, %d12, %d48
11217c478bd9Sstevel@tonic-gate	std	%d48, [%i0]
11227c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
11237c478bd9Sstevel@tonic-gateblkd12:
11247c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
11257c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
11267c478bd9Sstevel@tonic-gate	faligndata %d12, %d14, %d48
11277c478bd9Sstevel@tonic-gate	std	%d48, [%i0]
11287c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
11297c478bd9Sstevel@tonic-gateblkd14:
11307c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
11317c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
11327c478bd9Sstevel@tonic-gate	fsrc1	%d14, %d0
11337c478bd9Sstevel@tonic-gate	ba,a,pt	%ncc, blkleft
11347c478bd9Sstevel@tonic-gate
11357c478bd9Sstevel@tonic-gateblkd16:
11367c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
11377c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
11387c478bd9Sstevel@tonic-gate	faligndata %d16, %d18, %d48
11397c478bd9Sstevel@tonic-gate	std	%d48, [%i0]
11407c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
11417c478bd9Sstevel@tonic-gateblkd18:
11427c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
11437c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
11447c478bd9Sstevel@tonic-gate	faligndata %d18, %d20, %d48
11457c478bd9Sstevel@tonic-gate	std	%d48, [%i0]
11467c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
11477c478bd9Sstevel@tonic-gateblkd20:
11487c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
11497c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
11507c478bd9Sstevel@tonic-gate	faligndata %d20, %d22, %d48
11517c478bd9Sstevel@tonic-gate	std	%d48, [%i0]
11527c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
11537c478bd9Sstevel@tonic-gateblkd22:
11547c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
11557c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
11567c478bd9Sstevel@tonic-gate	faligndata %d22, %d24, %d48
11577c478bd9Sstevel@tonic-gate	std	%d48, [%i0]
11587c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
11597c478bd9Sstevel@tonic-gateblkd24:
11607c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
11617c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
11627c478bd9Sstevel@tonic-gate	faligndata %d24, %d26, %d48
11637c478bd9Sstevel@tonic-gate	std	%d48, [%i0]
11647c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
11657c478bd9Sstevel@tonic-gateblkd26:
11667c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
11677c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
11687c478bd9Sstevel@tonic-gate	faligndata %d26, %d28, %d48
11697c478bd9Sstevel@tonic-gate	std	%d48, [%i0]
11707c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
11717c478bd9Sstevel@tonic-gateblkd28:
11727c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
11737c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
11747c478bd9Sstevel@tonic-gate	faligndata %d28, %d30, %d48
11757c478bd9Sstevel@tonic-gate	std	%d48, [%i0]
11767c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
11777c478bd9Sstevel@tonic-gateblkd30:
11787c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
11797c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
11807c478bd9Sstevel@tonic-gate	fsrc1	%d30, %d0
11817c478bd9Sstevel@tonic-gate	ba,a,pt	%ncc, blkleft
11827c478bd9Sstevel@tonic-gateblkd32:
11837c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
11847c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
11857c478bd9Sstevel@tonic-gate	faligndata %d32, %d34, %d48
11867c478bd9Sstevel@tonic-gate	std	%d48, [%i0]
11877c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
11887c478bd9Sstevel@tonic-gateblkd34:
11897c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
11907c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
11917c478bd9Sstevel@tonic-gate	faligndata %d34, %d36, %d48
11927c478bd9Sstevel@tonic-gate	std	%d48, [%i0]
11937c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
11947c478bd9Sstevel@tonic-gateblkd36:
11957c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
11967c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
11977c478bd9Sstevel@tonic-gate	faligndata %d36, %d38, %d48
11987c478bd9Sstevel@tonic-gate	std	%d48, [%i0]
11997c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
12007c478bd9Sstevel@tonic-gateblkd38:
12017c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
12027c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
12037c478bd9Sstevel@tonic-gate	faligndata %d38, %d40, %d48
12047c478bd9Sstevel@tonic-gate	std	%d48, [%i0]
12057c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
12067c478bd9Sstevel@tonic-gateblkd40:
12077c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
12087c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
12097c478bd9Sstevel@tonic-gate	faligndata %d40, %d42, %d48
12107c478bd9Sstevel@tonic-gate	std	%d48, [%i0]
12117c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
12127c478bd9Sstevel@tonic-gateblkd42:
12137c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
12147c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
12157c478bd9Sstevel@tonic-gate	faligndata %d42, %d44, %d48
12167c478bd9Sstevel@tonic-gate	std	%d48, [%i0]
12177c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
12187c478bd9Sstevel@tonic-gateblkd44:
12197c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
12207c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
12217c478bd9Sstevel@tonic-gate	faligndata %d44, %d46, %d48
12227c478bd9Sstevel@tonic-gate	std	%d48, [%i0]
12237c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
12247c478bd9Sstevel@tonic-gateblkd46:
12257c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
12267c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
12277c478bd9Sstevel@tonic-gate	fsrc1	%d46, %d0
12287c478bd9Sstevel@tonic-gate
12297c478bd9Sstevel@tonic-gateblkleft:
12307c478bd9Sstevel@tonic-gate	ldd	[%l7], %d2
12317c478bd9Sstevel@tonic-gate	add	%l7, 8, %l7
12327c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
12337c478bd9Sstevel@tonic-gate	faligndata %d0, %d2, %d8
12347c478bd9Sstevel@tonic-gate	std	%d8, [%i0]
12357c478bd9Sstevel@tonic-gate	blu,pn	%ncc, blkdone
12367c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
12377c478bd9Sstevel@tonic-gate	ldd	[%l7], %d0
12387c478bd9Sstevel@tonic-gate	add	%l7, 8, %l7
12397c478bd9Sstevel@tonic-gate	subcc	%i4, 8, %i4
12407c478bd9Sstevel@tonic-gate	faligndata %d2, %d0, %d8
12417c478bd9Sstevel@tonic-gate	std	%d8, [%i0]
12427c478bd9Sstevel@tonic-gate	bgeu,pt	%ncc, blkleft
12437c478bd9Sstevel@tonic-gate	add	%i0, 8, %i0
12447c478bd9Sstevel@tonic-gate
12457c478bd9Sstevel@tonic-gateblkdone:
12467c478bd9Sstevel@tonic-gate	tst	%i2
12477c478bd9Sstevel@tonic-gate	bz,pt 	%ncc, blkexit
12487c478bd9Sstevel@tonic-gate	and	%l3, 0x4, %l3		! fprs.du = fprs.dl = 0
12497c478bd9Sstevel@tonic-gate
12507c478bd9Sstevel@tonic-gate7:      ldub    [%i1], %i4
12517c478bd9Sstevel@tonic-gate        inc     %i1
12527c478bd9Sstevel@tonic-gate        inc     %i0
12537c478bd9Sstevel@tonic-gate        deccc   %i2
12547c478bd9Sstevel@tonic-gate        bgu  	%ncc, 7b
12557c478bd9Sstevel@tonic-gate        stb     %i4, [%i0 - 1]
12567c478bd9Sstevel@tonic-gate
12577c478bd9Sstevel@tonic-gateblkexit:
12587c478bd9Sstevel@tonic-gate        and     %l3, 0x4, %l3           ! fprs.du = fprs.dl = 0
12597c478bd9Sstevel@tonic-gate	wr      %l3, %g0, %fprs         ! fprs = l3 - restore fprs.fef
12607c478bd9Sstevel@tonic-gate	membar  #StoreLoad|#StoreStore
12617c478bd9Sstevel@tonic-gate	ret
12627c478bd9Sstevel@tonic-gate	restore %i5, %g0, %o0
12637c478bd9Sstevel@tonic-gate
12647c478bd9Sstevel@tonic-gate	SET_SIZE(memcpy)
12657c478bd9Sstevel@tonic-gate	SET_SIZE(__align_cpy_1)
1266