8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / uts / i86pc / ml / kdi_subr.s
blob8ed90ed4103bb67da5f53ff89d0cc63069c96641
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
23 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #pragma ident "%Z%%M% %I% %E% SMI"
29 #include <sys/asm_linkage.h>
30 #include <sys/asm_misc.h>
31 #include <sys/regset.h>
32 #include <sys/privregs.h>
33 #include <sys/psw.h>
35 #if defined(__lint)
36 #include <sys/types.h>
37 #include <sys/segments.h>
38 #endif
40 #if defined(__lint)
42 ulong_t
43 kdi_getdr0(void)
45 return (0);
48 ulong_t
49 kdi_getdr1(void)
51 return (0);
54 ulong_t
55 kdi_getdr2(void)
57 return (0);
60 ulong_t
61 kdi_getdr3(void)
63 return (0);
66 ulong_t
67 kdi_getdr6(void)
69 return (0);
72 ulong_t
73 kdi_getdr7(void)
75 return (0);
78 /*ARGSUSED*/
79 void
80 kdi_setdr0(ulong_t value)
83 /*ARGSUSED*/
84 void
85 kdi_setdr1(ulong_t value)
88 /*ARGSUSED*/
89 void
90 kdi_setdr2(ulong_t value)
93 /*ARGSUSED*/
94 void
95 kdi_setdr3(ulong_t value)
98 /*ARGSUSED*/
99 void
100 kdi_setdr4(ulong_t value)
103 /*ARGSUSED*/
104 void
105 kdi_setdr6(ulong_t value)
108 /*ARGSUSED*/
109 void
110 kdi_setdr7(ulong_t value)
113 #else
115 #if defined(__amd64)
117 #define GETDREG(name, r) \
118 ENTRY_NP(name); \
119 movq r, %rax; \
120 ret; \
121 SET_SIZE(name)
123 #define SETDREG(name, r) \
124 ENTRY_NP(name); \
125 movq %rdi, r; \
126 ret; \
127 SET_SIZE(name)
129 #elif defined(__i386)
131 #define GETDREG(name, r) \
132 ENTRY_NP(name); \
133 movl r, %eax; \
134 ret; \
135 SET_SIZE(name)
137 #define SETDREG(name, r) \
138 ENTRY_NP(name); \
139 movl 4(%esp), %eax; \
140 movl %eax, r; \
141 ret; \
142 SET_SIZE(name)
144 #endif
146 GETDREG(kdi_getdr0, %dr0)
147 GETDREG(kdi_getdr1, %dr1)
148 GETDREG(kdi_getdr2, %dr2)
149 GETDREG(kdi_getdr3, %dr3)
150 GETDREG(kdi_getdr6, %dr6)
151 GETDREG(kdi_getdr7, %dr7)
153 SETDREG(kdi_setdr0, %dr0)
154 SETDREG(kdi_setdr1, %dr1)
155 SETDREG(kdi_setdr2, %dr2)
156 SETDREG(kdi_setdr3, %dr3)
157 SETDREG(kdi_setdr6, %dr6)
158 SETDREG(kdi_setdr7, %dr7)
160 #endif /* __lint */