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>
35 #if !defined(__lint) && defined(__GNUC__)
37 #if defined(__i386) || defined(__amd64)
39 extern __GNU_INLINE
void
49 * prefetch is an SSE extension which is not supported on
50 * older 32-bit processors, so define this as a no-op for now
53 extern __GNU_INLINE
void
54 prefetch_read_many(void *addr
)
65 extern __GNU_INLINE
void
66 refetch_read_once(void *addr
)
77 extern __GNU_INLINE
void
78 prefetch_write_many(void *addr
)
89 extern __GNU_INLINE
void
90 prefetch_write_once(void *addr
)
103 extern __GNU_INLINE
void
106 __asm__
__volatile__(
107 "cli" : : : "memory");
110 extern __GNU_INLINE
void
113 __asm__
__volatile__(
117 extern __GNU_INLINE
void
120 __asm__
__volatile__(
126 #endif /* __i386 || defined(__amd64) */
130 extern __GNU_INLINE
void
131 __set_ds(selector_t value
)
133 __asm__
__volatile__(
139 extern __GNU_INLINE
void
140 __set_es(selector_t value
)
142 __asm__
__volatile__(
148 extern __GNU_INLINE
void
149 __set_fs(selector_t value
)
151 __asm__
__volatile__(
157 extern __GNU_INLINE
void
158 __set_gs(selector_t value
)
160 __asm__
__volatile__(
168 extern __GNU_INLINE
void
171 __asm__
__volatile__(
179 #endif /* !__lint && __GNUC__ */
185 #endif /* _ASM_CPU_H */