Print this page
de-linting of .s files
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/sun4u/sunfire/ml/ac_asm.s
+++ new/usr/src/uts/sun4u/sunfire/ml/ac_asm.s
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
↓ open down ↓ |
16 lines elided |
↑ open up ↑ |
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright 1998 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 */
26 26
27 -#pragma ident "%Z%%M% %I% %E% SMI"
28 -
29 27 #include <sys/param.h>
30 28 #include <sys/errno.h>
31 29 #include <sys/asm_linkage.h>
32 30 #include <sys/vtrace.h>
33 31 #include <sys/machthread.h>
34 32 #include <sys/clock.h>
35 33 #include <sys/asi.h>
36 34 #include <sys/fsr.h>
37 35 #include <sys/privregs.h>
38 36 #include <sys/pte.h>
39 37 #include <sys/mmu.h>
40 38 #include <sys/spitregs.h>
41 39
42 -#if defined(lint)
43 -
44 -#else /* lint */
45 40 #include "assym.h"
46 -#endif /* lint */
47 41
48 42 #define TT_HSM 0x99
49 43
50 -#if defined(lint)
51 -/* ARGSUSED */
52 -void
53 -ac_blkcopy(caddr_t src, caddr_t dst, u_int linecount, u_int linesize)
54 -{}
55 -#else /* !lint */
56 44 !
57 45 ! Move a single cache line of data. Survive UE and CE on the read
58 46 !
59 47 ! i0 = src va
60 48 ! i1 = dst va
61 49 ! i2 = line count
62 50 ! i3 = line size
63 51 ! i4 = cache of fpu state
64 52 !
65 53 ENTRY(ac_blkcopy)
66 54
67 55 ! TODO: can we safely SAVE here
68 56 save %sp, -SA(MINFRAME + 2*64), %sp
69 57
70 58 ! XXX do we need to save the state of the fpu?
71 59 rd %fprs, %i4
72 60 btst (FPRS_DU|FPRS_DL|FPRS_FEF), %i4
73 61
74 62 ! always enable FPU
75 63 wr %g0, FPRS_FEF, %fprs
76 64
77 65 bz,a 1f
78 66 nop
79 67
80 68 ! save in-use fpregs on stack
81 69 membar #Sync
82 70 add %fp, STACK_BIAS - 81, %o2
83 71 and %o2, -64, %o2
84 72 stda %d0, [%o2]ASI_BLK_P
85 73 membar #Sync
86 74
87 75 1:
88 76 brz,pn %i2, 2f ! while (linecount) {
89 77 nop
90 78 ldda [%i0]ASI_BLK_P, %d0 ! *dst = *src;
91 79 membar #Sync
92 80 stda %d0, [%i1]ASI_BLK_COMMIT_P
93 81 membar #Sync
94 82
95 83 add %i0, %i3, %i0 ! dst++, src++;
96 84 add %i1, %i3, %i1
97 85
98 86 ba 1b ! linecount-- }
99 87 dec %i2
100 88
101 89 2:
102 90 membar #Sync
103 91
104 92 ! restore fp to the way we got it
105 93 btst (FPRS_DU|FPRS_DL|FPRS_FEF), %i4
106 94 bz,a 3f
107 95 nop
108 96
109 97 ! restore fpregs from stack
↓ open down ↓ |
44 lines elided |
↑ open up ↑ |
110 98 add %fp, STACK_BIAS - 81, %o2
111 99 and %o2, -64, %o2
112 100 ldda [%o2]ASI_BLK_P, %d0
113 101 membar #Sync
114 102
115 103 3:
116 104 wr %g0, %i4, %fprs ! fpu back to the way it was
117 105 ret
118 106 restore
119 107 SET_SIZE(ac_blkcopy)
120 -#endif /* lint */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX