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]
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
29 #include <sys/ccompile.h>
36 #if defined(__i386) || defined(__amd64)
38 extern __GNU_INLINE
void
48 * prefetch is an SSE extension which is not supported on
49 * older 32-bit processors, so define this as a no-op for now
52 extern __GNU_INLINE
void
53 prefetch_read_many(void *addr
)
64 extern __GNU_INLINE
void
65 refetch_read_once(void *addr
)
76 extern __GNU_INLINE
void
77 prefetch_write_many(void *addr
)
88 extern __GNU_INLINE
void
89 prefetch_write_once(void *addr
)
102 extern __GNU_INLINE
void
105 __asm__
__volatile__(
106 "cli" : : : "memory");
109 extern __GNU_INLINE
void
112 __asm__
__volatile__(
116 extern __GNU_INLINE
void
119 __asm__
__volatile__(
125 #endif /* __i386 || defined(__amd64) */
129 extern __GNU_INLINE
void
130 __set_ds(selector_t value
)
132 __asm__
__volatile__(
138 extern __GNU_INLINE
void
139 __set_es(selector_t value
)
141 __asm__
__volatile__(
147 extern __GNU_INLINE
void
148 __set_fs(selector_t value
)
150 __asm__
__volatile__(
156 extern __GNU_INLINE
void
157 __set_gs(selector_t value
)
159 __asm__
__volatile__(
167 extern __GNU_INLINE
void
170 __asm__
__volatile__(
183 #endif /* _ASM_CPU_H */