* ========== Copyright Header Begin ==========================================
* OpenSPARC T2 Processor File: tso_n1_binit3.s
* Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved
* 4150 Network Circle, Santa Clara, California 95054, U.S.A.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* For the avoidance of doubt, and except that if any non-GPL license
* choice is available it will apply instead, Sun elects to use only
* the General Public License version 2 (GPLv2) at this time for any
* software where a choice of GPL license versions is made
* available with the language indicating that GPLv2 or any later version
* may be used, or where a choice of which version of the GPL is applied is
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* ========== Copyright Header End ============================================
wr %g0, 0x4, %fprs /* make sure fef is 1 */
setx in_stream, %g2, srcaddr
setx out_stream, %g2, dstaddr
add srcaddr, 0x10, srcaddr
add srcaddr, 0x10, srcaddr
add srcaddr, 0x10, srcaddr
add srcaddr, 0x10, srcaddr
add dstaddr, 0x8, dstaddr
add dstaddr, 0x8, dstaddr
add dstaddr, 0x8, dstaddr
add dstaddr, 0x8, dstaddr
add dstaddr, 0x8, dstaddr
add dstaddr, 0x8, dstaddr
add dstaddr, 0x8, dstaddr
add dstaddr, 0x8, dstaddr
setx in_stream1, %g2, srcaddr
setx out_stream1, %g2, dstaddr
alignaddr srcaddr, %g0, srcaddr
prefetch [srcaddr + 0*64], 1
prefetch [srcaddr + 1*64], 1
prefetch [srcaddr + 2*64], 1
prefetch [srcaddr + 3*64], 1
prefetch [srcaddr + 4*64], 1
faligndata %f0, %f2, %f32
faligndata %f2, %f4, %f34
faligndata %f4, %f6, %f36
ldd [srcaddr + 5*8], %f10
faligndata %f6, %f8, %f38
ldd [srcaddr + 6*8], %f12
faligndata %f8, %f10, %f40
ldd [srcaddr + 7*8], %f14
faligndata %f10, %f12, %f42
ldd [srcaddr + 8*8], %f16
faligndata %f12, %f14, %f44
faligndata %f14, %f0, %f46
stda %f32, [dstaddr]ASI_BLK_P
faligndata %f0, %f2, %f32
faligndata %f2, %f4, %f34
ldd [srcaddr + 5*8], %f10
faligndata %f4, %f6, %f36
ldd [srcaddr + 6*8], %f12
faligndata %f6, %f8, %f38
ldd [srcaddr + 7*8], %f14
faligndata %f8, %f10, %f40
ldd [srcaddr + 8*8], %f16
prefetch [srcaddr + 64], 1
faligndata %f10, %f12, %f42
tidy_up: ! should handle the remaining partial block here
faligndata %f12, %f14, %f44
faligndata %f14, %f0, %f46
stda %f32, [dstaddr]ASI_BLK_P
setx in_stream2, %g2, srcaddr
setx out_stream2, %g2, dstaddr
add srcaddr, 0x10, srcaddr
add srcaddr, 0x10, srcaddr
add srcaddr, 0x10, srcaddr
add srcaddr, 0x10, srcaddr
stx %l4, [dstaddr + 0x10]
stx %l3, [dstaddr + 0x18]
stx %l4, [dstaddr + 0x20]
stx %l5, [dstaddr + 0x28]
stx %l6, [dstaddr + 0x30]
stx %l7, [dstaddr + 0x38]
add dstaddr, 0x40, dstaddr
setx in_stream3, %g2, srcaddr
setx out_stream3, %g2, dstaddr
add srcaddr, 0x10, srcaddr
add srcaddr, 0x10, srcaddr
add srcaddr, 0x10, srcaddr
add srcaddr, 0x10, srcaddr
add dstaddr, 0x8, dstaddr
add dstaddr, 0x8, dstaddr
add dstaddr, 0x8, dstaddr
add dstaddr, 0x8, dstaddr
add dstaddr, 0x8, dstaddr
add dstaddr, 0x8, dstaddr
add dstaddr, 0x8, dstaddr
add dstaddr, 0x8, dstaddr
setx in_stream4, %g2, srcaddr
setx out_stream4, %g2, dstaddr
add srcaddr, 0x10, srcaddr
add srcaddr, 0x10, srcaddr
add srcaddr, 0x10, srcaddr
add srcaddr, 0x10, srcaddr
add dstaddr, 0x8, dstaddr
add dstaddr, 0x8, dstaddr
add dstaddr, 0x8, dstaddr
add dstaddr, 0x8, dstaddr
add dstaddr, 0x8, dstaddr
add dstaddr, 0x8, dstaddr
add dstaddr, 0x8, dstaddr
add dstaddr, 0x8, dstaddr
setx out_stream, %g2, srcaddr
setx 0xff * 0x40, %g2, %g3
add srcaddr, %g3, srcaddr
sub srcaddr, 0x10, srcaddr
sub srcaddr, 0x10, srcaddr
sub srcaddr, 0x10, srcaddr
sub srcaddr, 0x10, srcaddr
setx out_stream, %g2, srcaddr
setx 0xff * 0x40, %g2, %g3
add srcaddr, %g3, srcaddr
sub srcaddr, 0x10, srcaddr
sub srcaddr, 0x10, srcaddr
sub srcaddr, 0x10, srcaddr
sub srcaddr, 0x10, srcaddr
setx out_stream2, %g2, srcaddr
setx 0xff * 0x40, %g2, %g3
add srcaddr, %g3, srcaddr
sub srcaddr, 0x10, srcaddr
sub srcaddr, 0x10, srcaddr
sub srcaddr, 0x10, srcaddr
sub srcaddr, 0x10, srcaddr
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! offset the out_stream block
! offset the out_stream block
! offset the out_stream block
! offset the out_stream block
! offset the out_stream block