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]
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>
36 #include <sys/types.h>
37 #include <sys/segments.h>
80 kdi_setdr0
(ulong_t value
)
85 kdi_setdr1
(ulong_t value
)
90 kdi_setdr2
(ulong_t value
)
95 kdi_setdr3
(ulong_t value
)
100 kdi_setdr4
(ulong_t value
)
105 kdi_setdr6
(ulong_t value
)
110 kdi_setdr7
(ulong_t value
)
117 #define GETDREG(name, r) \
123 #define SETDREG(name, r) \
129 #elif defined(__i386)
131 #define GETDREG(name, r) \
137 #define SETDREG(name, r) \
139 movl
4(%esp
), %eax; \
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
)