Remove the priority part of the priority|flags argument to tsleep(). Only
[dragonfly.git] / sys / i386 / boot / biosboot / asm.h
1 /*
2  * Mach Operating System
3  * Copyright (c) 1991,1990,1989 Carnegie Mellon University
4  * All Rights Reserved.
5  *
6  * Permission to use, copy, modify and distribute this software and its
7  * documentation is hereby granted, provided that both the copyright
8  * notice and this permission notice appear in all copies of the
9  * software, derivative works or modified versions, and any portions
10  * thereof, and that both notices appear in supporting documentation.
11  *
12  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15  *
16  * Carnegie Mellon requests users of this software to return to
17  *
18  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
19  *  School of Computer Science
20  *  Carnegie Mellon University
21  *  Pittsburgh PA 15213-3890
22  *
23  * any improvements or extensions that they make and grant Carnegie Mellon
24  * the rights to redistribute these changes.
25  *
26  *      from: Mach, Revision 2.7  92/02/29  15:33:41  rpd
27  * $FreeBSD: src/sys/i386/boot/biosboot/asm.h,v 1.9 1999/08/28 00:43:11 peter Exp $
28  * $DragonFly: src/sys/i386/boot/biosboot/Attic/asm.h,v 1.2 2003/06/17 04:28:34 dillon Exp $
29  */
30
31 #define S_ARG0   4(%esp)
32 #define S_ARG1   8(%esp)
33 #define S_ARG2  12(%esp)
34 #define S_ARG3  16(%esp)
35
36 #define FRAME   pushl %ebp; movl %esp, %ebp
37 #define EMARF   leave
38
39 #define B_ARG0   8(%ebp)
40 #define B_ARG1  12(%ebp)
41 #define B_ARG2  16(%ebp)
42 #define B_ARG3  20(%ebp)
43
44 #ifdef  wheeze
45
46 #define ALIGN 4
47 #define EXT(x) x
48 #define LEXT(x) x:
49 #define LCL(x) ./**/x
50
51 #define LB(x,n) ./**/x
52 #define LBb(x,n) ./**/x
53 #define LBf(x,n) ./**/x
54
55 #define SVC lcall $7,$0
56
57 #define String .string
58 #define Value  .value
59 #define Times(a,b) [a\*b]
60 #define Divide(a,b) [a\\b]
61
62 #define INB     inb     (%dx)
63 #define OUTB    outb    (%dx)
64 #define INL     inl     (%dx)
65 #define OUTL    outl    (%dx)
66
67 #else   wheeze
68 #define ALIGN
69 #define LCL(x)  x
70
71 #define LB(x,n) n
72 #ifdef  __STDC__
73 #define EXT(x) _ ## x
74 #define LEXT(x) _ ## x ## :
75
76 #define LBb(x,n) n ## b
77 #define LBf(x,n) n ## f
78 #else __STDC__
79 #define EXT(x) _/**/x
80 #define LEXT(x) _/**/x/**/:
81 #define LBb(x,n) n/**/b
82 #define LBf(x,n) n/**/f
83 #endif __STDC__
84 #define SVC .byte 0x9a; .long 0; .word 0x7
85
86 #define String  .ascii
87 #define Value   .word
88 #define Times(a,b) (a*b)
89 #define Divide(a,b) (a/b)
90
91 #define INB     inb     %dx, %al
92 #define OUTB    outb    %al, %dx
93 #define INL     inl     %dx, %eax
94 #define OUTL    outl    %eax, %dx
95
96 #endif  wheeze
97
98 #define addr32  .byte 0x67
99 #define data32  .byte 0x66
100
101 #ifdef GPROF
102 #ifdef  __STDC__
103
104 #define MCOUNT          .data; LB(x, 9); .long 0; .text; lea LBb(x, 9),%edx; call mcount
105 #define ENTRY(x)        .globl EXT(x); .align ALIGN; LEXT(x) ; \
106                         pushl %ebp; movl %esp, %ebp; MCOUNT; popl %ebp;
107 #define ENTRY2(x,y)     .globl EXT(x); .globl EXT(y); \
108                         .align ALIGN; LEXT(x) LEXT(y) ; \
109                         pushl %ebp; movl %esp, %ebp; MCOUNT; popl %ebp;
110 #define ASENTRY(x)      .globl x; .align ALIGN; x ## : ; \
111                         pushl %ebp; movl %esp, %ebp; MCOUNT; popl %ebp;
112
113 #else   __STDC__
114
115 #define MCOUNT          .data; LB(x, 9): .long 0; .text; lea LBb(x, 9),%edx; call mcount
116 #define ENTRY(x)        .globl EXT(x); .align ALIGN; LEXT(x) ; \
117                         pushl %ebp; movl %esp, %ebp; MCOUNT; popl %ebp;
118 #define ENTRY2(x,y)     .globl EXT(x); .globl EXT(y); \
119                         .align ALIGN; LEXT(x) LEXT(y)
120 #define ASENTRY(x)      .globl x; .align ALIGN; x: ; \
121                         pushl %ebp; movl %esp, %ebp; MCOUNT; popl %ebp;
122
123 #endif  __STDC__
124 #else   GPROF
125 #ifdef  __STDC__
126
127 #define MCOUNT
128 #define ENTRY(x)        .globl EXT(x); .align ALIGN; LEXT(x)
129 #define ENTRY2(x,y)     .globl EXT(x); .globl EXT(y); \
130                         .align ALIGN; LEXT(x) LEXT(y)
131 #define ASENTRY(x)      .globl x; .align ALIGN; x ## :
132
133 #else   __STDC__
134
135 #define MCOUNT
136 #define ENTRY(x)        .globl EXT(x); .align ALIGN; LEXT(x)
137 #define ENTRY2(x,y)     .globl EXT(x); .globl EXT(y); \
138                         .align ALIGN; LEXT(x) LEXT(y)
139 #define ASENTRY(x)      .globl x; .align ALIGN; x:
140
141 #endif  __STDC__
142 #endif  GPROF
143
144 #define Entry(x)        .globl EXT(x); .align ALIGN; LEXT(x)
145 #define DATA(x)         .globl EXT(x); .align ALIGN; LEXT(x)