Deleted Added
full compact
cpufunc.h (114349) cpufunc.h (114987)
1/*-
2 * Copyright (c) 1993 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
1/*-
2 * Copyright (c) 1993 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * $FreeBSD: head/sys/amd64/include/cpufunc.h 114349 2003-05-01 01:05:25Z peter $
33 * $FreeBSD: head/sys/amd64/include/cpufunc.h 114987 2003-05-14 04:10:49Z peter $
34 */
35
36/*
37 * Functions to provide access to special i386 instructions.
38 * This in included in sys/systm.h, and that file should be
39 * used in preference to this.
40 */
41

--- 400 unchanged lines hidden (view full) ---

442 */
443static __inline void
444invlpg(u_long addr)
445{
446
447 __asm __volatile("invlpg %0" : : "m" (*(char *)addr) : "memory");
448}
449
34 */
35
36/*
37 * Functions to provide access to special i386 instructions.
38 * This in included in sys/systm.h, and that file should be
39 * used in preference to this.
40 */
41

--- 400 unchanged lines hidden (view full) ---

442 */
443static __inline void
444invlpg(u_long addr)
445{
446
447 __asm __volatile("invlpg %0" : : "m" (*(char *)addr) : "memory");
448}
449
450/* XXX these are replaced with rdmsr/wrmsr */
451static __inline u_int
452rfs(void)
453{
454 u_int sel;
455 __asm __volatile("movl %%fs,%0" : "=rm" (sel));
456 return (sel);
457}
458
459static __inline u_int
460rgs(void)
461{
462 u_int sel;
463 __asm __volatile("movl %%gs,%0" : "=rm" (sel));
464 return (sel);
465}
466
467static __inline void
450static __inline u_int
451rfs(void)
452{
453 u_int sel;
454 __asm __volatile("movl %%fs,%0" : "=rm" (sel));
455 return (sel);
456}
457
458static __inline u_int
459rgs(void)
460{
461 u_int sel;
462 __asm __volatile("movl %%gs,%0" : "=rm" (sel));
463 return (sel);
464}
465
466static __inline void
467load_ds(u_int sel)
468{
469 __asm __volatile("movl %0,%%ds" : : "rm" (sel));
470}
471
472static __inline void
473load_es(u_int sel)
474{
475 __asm __volatile("movl %0,%%es" : : "rm" (sel));
476}
477
478static __inline void
468load_fs(u_int sel)
469{
470 __asm __volatile("movl %0,%%fs" : : "rm" (sel));
471}
472
473static __inline void
474load_gs(u_int sel)
475{

--- 101 unchanged lines hidden ---
479load_fs(u_int sel)
480{
481 __asm __volatile("movl %0,%%fs" : : "rm" (sel));
482}
483
484static __inline void
485load_gs(u_int sel)
486{

--- 101 unchanged lines hidden ---