home *** CD-ROM | disk | FTP | other *** search
- /* Copyright (c) 1984, 1986, 1987, 1988 AT&T */
- /* All Rights Reserved */
-
- /* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
- /* The copyright notice above does not evidence any */
- /* actual or intended publication of such source code. */
-
- #ident "@(#)head.sys:inline.h 1.4"
-
- asm int flushtlb()
- {
- movl %cr3, %eax
- movl %eax, %cr3
- }
-
- asm int _cr0()
- {
- movl %cr0, %eax
- }
-
- asm int _cr2()
- {
- movl %cr2, %eax
- }
-
- asm int _cr3()
- {
- movl %cr3, %eax
- andl $0x7FFFFFFF, %eax
- }
-
- asm int _wdr0(x)
- {
- %reg x;
- movl x, %db0
- %ureg x;
- movl x, %db0
- %con x;
- movl $x,%eax
- movl %eax, %db0
- %mem x;
- movl x,%eax
- movl %eax, %db0
- }
-
- asm int _wdr1(x)
- {
- %reg x;
- movl x, %db1
- %ureg x;
- movl x, %db1
- %con x;
- movl $x,%eax
- movl %eax, %db1
- %mem x;
- movl x,%eax
- movl %eax, %db1
- }
-
- asm int _wdr2(x)
- {
- %reg x;
- movl x, %db2
- %ureg x;
- movl x, %db2
- %con x;
- movl $x,%eax
- movl %eax, %db2
- %mem x;
- movl x,%eax
- movl %eax, %db2
- }
-
- asm int _wdr3(x)
- {
- %reg x;
- movl x, %db3
- %ureg x;
- movl x, %db3
- %con x;
- movl $x,%eax
- movl %eax, %db3
- %mem x;
- movl x,%eax
- movl %eax, %db3
- }
-
- asm int _wdr6(x)
- {
- %reg x;
- movl x, %db6
- %ureg x;
- movl x, %db6
- %con x;
- movl $x,%eax
- movl %eax, %db6
- %mem x;
- movl x,%eax
- movl %eax, %db6
- }
-
- asm int _wdr7(x)
- {
- %reg x;
- movl x, %db7
- %ureg x;
- movl x, %db7
- %con x;
- movl $x,%eax
- movl %eax, %db7
- %mem x;
- movl x,%eax
- movl %eax, %db7
- }
-
- asm int _dr0()
- {
- movl %dr0, %eax
- }
-
- asm int _dr1()
- {
- movl %dr1, %eax
- }
-
- asm int _dr2()
- {
- movl %dr2, %eax
- }
-
- asm int _dr3()
- {
- movl %dr3, %eax
- }
-
- asm int _dr6()
- {
- movl %dr6, %eax
- }
-
- asm int _dr7()
- {
- movl %dr7, %eax
- }
-
- asm int loadtr(x)
- {
- %reg x;
- movl x,%eax
- ltr %ax
- %ureg x;
- movl x,%eax
- ltr %ax
- %con x;
- movl $x,%eax
- ltr %ax
- %mem x;
- movl x,%eax
- ltr %ax
- }
-
- asm int outl(port,val)
- {
- %reg port,val;
- movl port, %edx
- movl val, %eax
- outl (%dx)
- %reg port; mem val;
- movl port, %edx
- movl val, %eax
- outl (%dx)
- %mem port; reg val;
- movw port, %dx
- movl val, %eax
- outl (%dx)
- %mem port,val;
- movw port, %dx
- movl val, %eax
- outl (%dx)
- }
-
- asm int outw(port,val)
- {
- %reg port,val;
- movl port, %edx
- movl val, %eax
- data16
- outl (%dx)
- %reg port; mem val;
- movl port, %edx
- movw val, %ax
- data16
- outl (%dx)
- %mem port; reg val;
- movw port, %dx
- movl val, %eax
- data16
- outl (%dx)
- %mem port,val;
- movw port, %dx
- movw val, %ax
- data16
- outl (%dx)
- }
-
- asm int outb(port,val)
- {
- %reg port,val;
- movl port, %edx
- movl val, %eax
- outb (%dx)
- %reg port; mem val;
- movl port, %edx
- movb val, %al
- outb (%dx)
- %mem port; reg val;
- movw port, %dx
- movl val, %eax
- outb (%dx)
- %mem port,val;
- movw port, %dx
- movb val, %al
- outb (%dx)
- }
-
- asm int inl(port)
- {
- %reg port;
- movl port, %edx
- inl (%dx)
- %mem port;
- movw port, %dx
- inl (%dx)
- }
-
- asm int inw(port)
- {
- %reg port;
- subl %eax, %eax
- movl port, %edx
- data16
- inl (%dx)
- %mem port;
- subl %eax, %eax
- movw port, %dx
- data16
- inl (%dx)
- }
-
- asm int inb(port)
- {
- %reg port;
- subl %eax, %eax
- movl port, %edx
- inb (%dx)
- %mem port;
- subl %eax, %eax
- movw port, %dx
- inb (%dx)
- }
-
- asm int intr_disable()
- {
- pushfl
- cli
- }
-
- asm int intr_restore()
- {
- popfl
- }
-
-