8354 sync regcomp(3C) with upstream (fix make catalog)
[unleashed/tickless.git] / usr / src / uts / sun4u / ml / memscrub_asm.s
blob037f0c0d40158938e730c4b8351248bb6ef4251e
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright (c) 2007 by Sun Microsystems, Inc.
26 #pragma ident "%Z%%M% %I% %E% SMI"
29 * General machine architecture & implementation specific
30 * assembly language routines.
32 #if defined(lint)
33 #include <sys/types.h>
34 #include <sys/machsystm.h>
35 #include <sys/t_lock.h>
36 #else /* lint */
37 #include "assym.h"
38 #endif /* lint */
40 #include <sys/asm_linkage.h>
41 #include <sys/eeprom.h>
42 #include <sys/param.h>
43 #include <sys/async.h>
44 #include <sys/intreg.h>
45 #include <sys/machthread.h>
46 #include <sys/iocache.h>
47 #include <sys/privregs.h>
48 #include <sys/archsystm.h>
50 #if defined(lint)
52 /*ARGSUSED*/
53 void
54 memscrub_read(caddr_t vaddr, u_int blks)
57 #else /* lint */
60 ! void memscrub_read(caddr_t src, u_int blks)
63 .seg ".text"
64 .align 4
66 ENTRY(memscrub_read)
67 srl %o1, 0, %o1 ! clear upper word of blk count
68 rd %fprs, %o2 ! get the status of fp
69 wr %g0, FPRS_FEF, %fprs ! enable fp
72 prefetch [%o0 + 8*64], 0
73 ldda [%o0]ASI_BLK_P, %d0
74 add %o0, 64, %o0
75 prefetch [%o0 + 8*64], 0
76 ldda [%o0]ASI_BLK_P, %d16
77 add %o0, 64, %o0
78 prefetch [%o0 + 8*64], 0
79 ldda [%o0]ASI_BLK_P, %d32
80 add %o0, 64, %o0
81 prefetch [%o0 + 8*64], 0
82 ldda [%o0]ASI_BLK_P, %d48
83 dec %o1
84 brnz,a %o1, 1b
85 add %o0, 64, %o0
87 retl
88 wr %o2, 0, %fprs ! restore fprs (disabled)
89 SET_SIZE(memscrub_read)
91 #endif /* lint */