summaryrefslogtreecommitdiff
path: root/devel/mit-pthreads/patches/patch-bs
blob: 8ff907cabe7e514916b6e7b2ccbc0b036743ed74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
$NetBSD: patch-bs,v 1.2 1999/12/28 05:08:11 wiz Exp $
diff -ur machdep/syscall-i386-netbsd-1.3.S machdep/syscall-i386-netbsd-1.3.S
--- machdep/syscall-i386-netbsd-1.3.S	Wed Nov  3 12:15:30 1999
+++ machdep/syscall-i386-netbsd-1.3.S	Wed Nov  3 19:04:58 1999
@@ -61,52 +61,47 @@
 	.text
 	.align	2
 
-
 /* ==========================================================================
  * machdep_sys_fork()
  */
-	.globl _machdep_sys_fork;		
-									
-_machdep_sys_fork:;				
-									
-	movl $(SYS_fork), %eax;		
-	.byte 0x9a; .long 0; .word 7;	
+	.globl _C_LABEL(machdep_sys_fork)
+
+_C_LABEL(machdep_sys_fork):
+	movl $(SYS_fork), %eax
+	.byte 0x9a		; .long 0; .word 7;
 	cmpl $0, %edx
 	je	2f
 	movl $0, %eax
-2:	
-	ret;							
+2:
+	ret
 
 /* ==========================================================================
  * machdep_sys___syscall()
  */
 
-_machdep_sys___syscall:;				
-
-	movl $(SYS___syscall), %eax;		
-	int $0x80;						
-	jb 3f;
+_C_LABEL(machdep_sys___syscall):
+	movl $(SYS___syscall), %eax
+	int $0x80
+	jb 3f
 	ret
 
 #ifndef SYS___sigsuspend14
 /* ==========================================================================
  * machdep_sys_sigsuspend()
  */
-	.globl _machdep_sys_sigsuspend;		
+	.globl _C_LABEL(machdep_sys_sigsuspend)
 
-_machdep_sys_sigsuspend:;
-
-	movl    4(%esp),%eax            # fetch mask arg
-    movl    (%eax),%eax             # indirect to mask arg
-    movl    %eax,4(%esp)
-	movl $(SYS_sigsuspend), %eax;		
-	int $0x80;						
-	jb 3f;
+_C_LABEL(machdep_sys_sigsuspend):
+	movl    4(%esp),%eax		; fetch mask arg
+	movl    (%eax),%eax		; indirect to mask arg
+	movl    %eax,4(%esp)
+	movl $(SYS_sigsuspend), %eax
+	int $0x80
+	jb 3f
 	ret
 #endif
 
 3:
-	
 	neg		%eax
 	movl	$0xffffffff,%edx
 	ret
@@ -114,39 +109,37 @@
 /* ==========================================================================
  * machdep_sys_lseek()
  */
-	.globl _machdep_sys_lseek;		
+	.globl _C_LABEL(machdep_sys_lseek)
 
-_machdep_sys_lseek:;				
-									
-	pushl  %ebp;
-	movl   %esp,%ebp;
-	pushl  0x14(%ebp);
-	pushl  0x10(%ebp);
-	pushl  0xc(%ebp);
-	pushl  $0x0;
-	pushl  0x8(%ebp);
-	pushl  $0x0;
-	pushl $(SYS_lseek);
-	call _machdep_sys___syscall;
+_C_LABEL(machdep_sys_lseek):
+	pushl  %ebp
+	movl   %esp,%ebp
+	pushl  0x14(%ebp)
+	pushl  0x10(%ebp)
+	pushl  0xc(%ebp)
+	pushl  $0x0
+	pushl  0x8(%ebp)
+	pushl  $0x0
+	pushl $(SYS_lseek)
+	call _C_LABEL(machdep_sys___syscall)
 	leave
 	ret
 
 /* ==========================================================================
  * machdep_sys_ftruncate() ; Added by Monty
  */
-        .globl _machdep_sys_ftruncate;
- 
-_machdep_sys_ftruncate:;
+        .globl _C_LABEL(machdep_sys_ftruncate)
  
-        pushl  %ebp; 
-        movl   %esp,%ebp;
-        pushl  0x10(%ebp);
-        pushl  0xc(%ebp);
+_C_LABEL(machdep_sys_ftruncate):
+	pushl  %ebp
+        movl   %esp,%ebp
+        pushl  0x10(%ebp)
+        pushl  0xc(%ebp)
         pushl  $0x0;			# Why this?
-        pushl  0x8(%ebp);
+        pushl  0x8(%ebp)
         pushl  $0x0;			# And this?
-        pushl $(SYS_ftruncate);
-        call _machdep_sys___syscall;
+        pushl $(SYS_ftruncate)
+        call _C_LABEL(machdep_sys___syscall);
         leave
         ret  
 
@@ -154,29 +147,28 @@
 /* ==========================================================================
  * machdep_sys_sigprocmask()
  */
-	.globl _machdep_sys_sigprocmask;		
+	.globl _C_LABEL(machdep_sys_sigprocmask)
+
+_C_LABEL(machdep_sys_sigprocmask):
 
-_machdep_sys_sigprocmask:;				
-									
 	movl 8(%esp),%ecx
 	movl (%ecx),%ecx
-    movl %ecx,8(%esp)
-	movl $(SYS_sigprocmask), %eax;		
-	int  $0x80;						
-	jb   3b;
+	movl %ecx,8(%esp)
+	movl $(SYS_sigprocmask), %eax
+	int  $0x80
+	jb   3b
 	ret
 #endif
 
 /* ==========================================================================
  * machdep_sys_pipe()
  */
-	.globl _machdep_sys_pipe;		
+	.globl _C_LABEL(machdep_sys_pipe)
 
-_machdep_sys_pipe:;	
-									
-	movl $(SYS_pipe), %eax;		
-	int  $0x80;						
-	jb   3b;
+_C_LABEL(machdep_sys_pipe):
+	movl $(SYS_pipe), %eax
+	int  $0x80
+	jb   3b
 	movl 4(%esp),%ecx
 	movl %eax,(%ecx)
 	movl %edx,4(%ecx)
@@ -186,15 +178,14 @@
 /* ==========================================================================
  * machdep_sys_fstat()
  */
-	.globl _machdep_sys_fstat;
+	.globl _C_LABEL(machdep_sys_fstat)
 
-_machdep_sys_fstat:;
-	movl $(SYS___fstat13), %eax;
-	int $0x80;
-	jb 4f;
+_C_LABEL(machdep_sys_fstat):
+	movl $(SYS___fstat13), %eax
+	int $0x80
+	jb 4f
 	ret
 4:
 	neg %eax
 	movl $0xffffffff,%edx
 	ret
-