diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:17:33 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:17:33 -0700 |
commit | 7850e4e406dce1f7a819297eeb151d1ca18e7cd9 (patch) | |
tree | d4befddacae46b06c4924193904de533099610b4 /contrib/asm386 | |
parent | ebd3c2c0e734fc99a1360014ea52ed04fe6aade4 (diff) | |
download | zlib-1.0.7.tar.gz zlib-1.0.7.tar.bz2 zlib-1.0.7.zip |
zlib 1.0.7v1.0.7
Diffstat (limited to 'contrib/asm386')
-rw-r--r-- | contrib/asm386/gvmat32.asm | 464 | ||||
-rw-r--r-- | contrib/asm386/gvmat32c.c | 229 | ||||
-rw-r--r-- | contrib/asm386/mkgvmt32.bat | 1 | ||||
-rw-r--r-- | contrib/asm386/zlibvc.mak | 781 |
4 files changed, 1475 insertions, 0 deletions
diff --git a/contrib/asm386/gvmat32.asm b/contrib/asm386/gvmat32.asm new file mode 100644 index 0000000..b175871 --- /dev/null +++ b/contrib/asm386/gvmat32.asm | |||
@@ -0,0 +1,464 @@ | |||
1 | ; | ||
2 | ; gvmat32.asm -- Asm portion of the optimized longest_match for 32 bits x86 | ||
3 | ; Copyright (C) 1995-1996 Jean-loup Gailly and Gilles Vollant. | ||
4 | ; File written by Gilles Vollant, by modifiying the longest_match | ||
5 | ; from Jean-loup Gailly in deflate.c | ||
6 | ; It need wmask == 0x7fff | ||
7 | ; (assembly code is faster with a fixed wmask) | ||
8 | ; | ||
9 | ; For Visual C++ 4.2 and ML 6.11c (version in directory \MASM611C of Win95 DDK) | ||
10 | ; I compile with : "ml /coff /Zi /c gvmat32.asm" | ||
11 | ; | ||
12 | ; uInt longest_match_gvasm(IPos cur_match,int* match_start_ptr,uInt scan_end, | ||
13 | ; uInt scan_start,ush* prev,uch* window,int best_len, | ||
14 | ; IPos limit,uInt chain_length,uch* scanrp, | ||
15 | ; uInt nice_match); | ||
16 | |||
17 | ;uInt longest_match(s, cur_match) | ||
18 | ; deflate_state *s; | ||
19 | ; IPos cur_match; /* current match */ | ||
20 | |||
21 | NbStack equ 76 | ||
22 | cur_match equ dword ptr[esp+NbStack-0] | ||
23 | str_s equ dword ptr[esp+NbStack-4] | ||
24 | ; 5 dword on top (ret,ebp,esi,edi,ebx) | ||
25 | adrret equ dword ptr[esp+NbStack-8] | ||
26 | pushebp equ dword ptr[esp+NbStack-12] | ||
27 | pushedi equ dword ptr[esp+NbStack-16] | ||
28 | pushesi equ dword ptr[esp+NbStack-20] | ||
29 | pushebx equ dword ptr[esp+NbStack-24] | ||
30 | |||
31 | chain_length equ dword ptr [esp+NbStack-28] | ||
32 | limit equ dword ptr [esp+NbStack-32] | ||
33 | best_len equ dword ptr [esp+NbStack-36] | ||
34 | window equ dword ptr [esp+NbStack-40] | ||
35 | prev equ dword ptr [esp+NbStack-44] | ||
36 | scan_start equ word ptr [esp+NbStack-48] | ||
37 | scan_end equ word ptr [esp+NbStack-52] | ||
38 | match_start_ptr equ dword ptr [esp+NbStack-56] | ||
39 | nice_match equ dword ptr [esp+NbStack-60] | ||
40 | scanrp equ dword ptr [esp+NbStack-64] | ||
41 | |||
42 | windowlen equ dword ptr [esp+NbStack-68] | ||
43 | match_start equ dword ptr [esp+NbStack-72] | ||
44 | strend equ dword ptr [esp+NbStack-76] | ||
45 | NbStackAdd equ (76-24) | ||
46 | |||
47 | .386p | ||
48 | |||
49 | name gvmatch | ||
50 | .MODEL FLAT | ||
51 | |||
52 | |||
53 | @lmtype TYPEDEF PROTO C :PTR , :SDWORD | ||
54 | longest_match_c PROTO @lmtype | ||
55 | |||
56 | dep_max_chain_length equ 70h | ||
57 | dep_window equ 2ch | ||
58 | dep_strstart equ 60h | ||
59 | dep_prev_length equ 6ch | ||
60 | dep_nice_match equ 84h | ||
61 | dep_w_size equ 20h | ||
62 | dep_prev equ 34h | ||
63 | dep_w_mask equ 28h | ||
64 | dep_good_match equ 80h | ||
65 | dep_match_start equ 64h | ||
66 | dep_lookahead equ 68h | ||
67 | |||
68 | |||
69 | _TEXT segment | ||
70 | public _longest_match_asm7fff | ||
71 | |||
72 | MAX_MATCH equ 258 | ||
73 | MIN_MATCH equ 3 | ||
74 | MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1) | ||
75 | |||
76 | ; initialize or check the variables used in match.asm. | ||
77 | |||
78 | |||
79 | ; ----------------------------------------------------------------------- | ||
80 | ; Set match_start to the longest match starting at the given string and | ||
81 | ; return its length. Matches shorter or equal to prev_length are discarded, | ||
82 | ; in which case the result is equal to prev_length and match_start is | ||
83 | ; garbage. | ||
84 | ; IN assertions: cur_match is the head of the hash chain for the current | ||
85 | ; string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 | ||
86 | |||
87 | ; int longest_match(cur_match) | ||
88 | |||
89 | _longest_match_asm7fff proc near | ||
90 | |||
91 | |||
92 | |||
93 | ; return address | ||
94 | |||
95 | mov eax,[esp+4] | ||
96 | mov bx,[eax+dep_w_mask] | ||
97 | cmp bx,7fffh | ||
98 | jnz longest_match_c | ||
99 | |||
100 | push ebp | ||
101 | push edi | ||
102 | push esi | ||
103 | push ebx | ||
104 | |||
105 | sub esp,NbStackAdd | ||
106 | |||
107 | ;//mov ebp,str_s | ||
108 | mov ebp,eax | ||
109 | |||
110 | mov eax,[ebp+dep_max_chain_length] | ||
111 | mov ebx,[ebp+dep_prev_length] | ||
112 | cmp [ebp+dep_good_match],ebx ; if prev_length>=good_match chain_length >>= 2 | ||
113 | ja noshr | ||
114 | shr eax,2 | ||
115 | noshr: | ||
116 | mov edi,[ebp+dep_nice_match] | ||
117 | mov chain_length,eax | ||
118 | mov edx,[ebp+dep_lookahead] | ||
119 | cmp edx,edi | ||
120 | ;if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; | ||
121 | jae nolookaheadnicematch | ||
122 | mov edi,edx | ||
123 | nolookaheadnicematch: | ||
124 | mov best_len,ebx | ||
125 | |||
126 | |||
127 | mov esi,[ebp+dep_window] | ||
128 | mov ecx,[ebp+dep_strstart] | ||
129 | mov window,esi | ||
130 | |||
131 | mov nice_match,edi | ||
132 | add esi,ecx | ||
133 | mov scanrp,esi | ||
134 | mov ax,word ptr [esi] | ||
135 | mov bx,word ptr [esi+ebx-1] | ||
136 | add esi,MAX_MATCH-1 | ||
137 | mov scan_start,ax | ||
138 | mov strend,esi | ||
139 | mov scan_end,bx | ||
140 | |||
141 | ; IPos limit = s->strstart > (IPos)MAX_DIST(s) ? | ||
142 | ; s->strstart - (IPos)MAX_DIST(s) : NIL; | ||
143 | |||
144 | mov esi,[ebp+dep_w_size] | ||
145 | sub esi,MIN_LOOKAHEAD | ||
146 | ; here esi = MAX_DIST(s) | ||
147 | sub ecx,esi | ||
148 | ja nodist | ||
149 | xor ecx,ecx | ||
150 | nodist: | ||
151 | mov limit,ecx | ||
152 | |||
153 | |||
154 | |||
155 | |||
156 | mov eax,[ebp+dep_prev] | ||
157 | mov prev,eax | ||
158 | |||
159 | mov ebx,dword ptr [ebp+dep_match_start] | ||
160 | mov bp,scan_start | ||
161 | mov edx,cur_match | ||
162 | mov match_start,ebx | ||
163 | |||
164 | mov bx,scan_end | ||
165 | mov eax,window | ||
166 | mov edi,eax | ||
167 | add edi,best_len | ||
168 | mov esi,prev | ||
169 | dec edi | ||
170 | mov windowlen,edi | ||
171 | |||
172 | jmp beginloop2 | ||
173 | align 4 | ||
174 | |||
175 | ; here, in the loop | ||
176 | ;;;; eax = chain_length | ||
177 | ; edx = dx = cur_match | ||
178 | ; ecx = limit | ||
179 | ; bx = scan_end | ||
180 | ; bp = scan_start | ||
181 | ; edi = windowlen (window + best_len) | ||
182 | ; esi = prev | ||
183 | |||
184 | |||
185 | ;// here; eax <=16 | ||
186 | normalbeg0add16: | ||
187 | add chain_length,16 | ||
188 | jz exitloop | ||
189 | normalbeg0: | ||
190 | cmp word ptr[edi+edx-0],bx | ||
191 | je normalbeg2 | ||
192 | and edx,7fffh | ||
193 | mov dx,word ptr[esi+edx*2] | ||
194 | cmp ecx,edx | ||
195 | jnb exitloop | ||
196 | dec chain_length | ||
197 | jnz normalbeg0 | ||
198 | ;jnbexitloopshort1: | ||
199 | jmp exitloop | ||
200 | |||
201 | contloop3: | ||
202 | mov edi,windowlen | ||
203 | |||
204 | ; cur_match = prev[cur_match & wmask] | ||
205 | and edx,7fffh | ||
206 | mov dx,word ptr[esi+edx*2] | ||
207 | ; if cur_match > limit, go to exitloop | ||
208 | cmp ecx,edx | ||
209 | jnbexitloopshort1: | ||
210 | jnb exitloop | ||
211 | ; if --chain_length != 0, go to exitloop | ||
212 | |||
213 | beginloop2: | ||
214 | sub chain_length,16+1 | ||
215 | jna normalbeg0add16 | ||
216 | |||
217 | do16: | ||
218 | cmp word ptr[edi+edx],bx | ||
219 | je normalbeg2dc0 | ||
220 | |||
221 | maccn MACRO lab | ||
222 | and edx,7fffh | ||
223 | mov dx,word ptr[esi+edx*2] | ||
224 | cmp ecx,edx | ||
225 | jnb exitloop | ||
226 | cmp word ptr[edi+edx-0],bx | ||
227 | je lab | ||
228 | ENDM | ||
229 | |||
230 | rcontloop0: | ||
231 | maccn normalbeg2dc1 | ||
232 | |||
233 | rcontloop1: | ||
234 | maccn normalbeg2dc2 | ||
235 | |||
236 | rcontloop2: | ||
237 | maccn normalbeg2dc3 | ||
238 | |||
239 | rcontloop3: | ||
240 | maccn normalbeg2dc4 | ||
241 | |||
242 | rcontloop4: | ||
243 | maccn normalbeg2dc5 | ||
244 | |||
245 | rcontloop5: | ||
246 | maccn normalbeg2dc6 | ||
247 | |||
248 | rcontloop6: | ||
249 | maccn normalbeg2dc7 | ||
250 | |||
251 | rcontloop7: | ||
252 | maccn normalbeg2dc8 | ||
253 | |||
254 | rcontloop8: | ||
255 | maccn normalbeg2dc9 | ||
256 | |||
257 | rcontloop9: | ||
258 | maccn normalbeg2dc10 | ||
259 | |||
260 | rcontloop10: | ||
261 | maccn normalbeg2dc11 | ||
262 | |||
263 | rcontloop11: | ||
264 | maccn short normalbeg2dc12 | ||
265 | |||
266 | rcontloop12: | ||
267 | maccn short normalbeg2dc13 | ||
268 | |||
269 | rcontloop13: | ||
270 | maccn short normalbeg2dc14 | ||
271 | |||
272 | rcontloop14: | ||
273 | maccn short normalbeg2dc15 | ||
274 | |||
275 | rcontloop15: | ||
276 | and edx,7fffh | ||
277 | mov dx,word ptr[esi+edx*2] | ||
278 | cmp ecx,edx | ||
279 | jnb short exitloopshort | ||
280 | |||
281 | sub chain_length,16 | ||
282 | ja do16 | ||
283 | jmp normalbeg0add16 | ||
284 | |||
285 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
286 | |||
287 | exitloopshort: | ||
288 | jmp exitloop | ||
289 | |||
290 | normbeg MACRO rcontlab,valsub | ||
291 | cmp bp,word ptr[eax+edx] | ||
292 | jne rcontlab | ||
293 | add chain_length,16-valsub | ||
294 | jmp iseq | ||
295 | ENDM | ||
296 | |||
297 | normalbeg2dc12: | ||
298 | normbeg rcontloop12,12 | ||
299 | |||
300 | normalbeg2dc13: | ||
301 | normbeg rcontloop13,13 | ||
302 | |||
303 | normalbeg2dc14: | ||
304 | normbeg rcontloop14,14 | ||
305 | |||
306 | normalbeg2dc15: | ||
307 | normbeg rcontloop15,15 | ||
308 | |||
309 | normalbeg2dc11: | ||
310 | normbeg rcontloop11,11 | ||
311 | |||
312 | normalbeg2dc10: | ||
313 | normbeg rcontloop10,10 | ||
314 | |||
315 | |||
316 | normalbeg2dc9: | ||
317 | normbeg rcontloop9,9 | ||
318 | |||
319 | normalbeg2dc8: | ||
320 | normbeg rcontloop8,8 | ||
321 | |||
322 | normalbeg2dc7: | ||
323 | normbeg rcontloop7,7 | ||
324 | |||
325 | normalbeg2dc5: | ||
326 | normbeg rcontloop5,5 | ||
327 | |||
328 | |||
329 | |||
330 | |||
331 | |||
332 | normalbeg2dc6: | ||
333 | normbeg rcontloop6,6 | ||
334 | |||
335 | normalbeg2dc4: | ||
336 | normbeg rcontloop4,4 | ||
337 | |||
338 | normalbeg2dc3: | ||
339 | normbeg rcontloop3,3 | ||
340 | |||
341 | normalbeg2dc2: | ||
342 | normbeg rcontloop2,2 | ||
343 | |||
344 | normalbeg2dc1: | ||
345 | normbeg rcontloop1,1 | ||
346 | |||
347 | normalbeg2dc0: | ||
348 | normbeg rcontloop0,0 | ||
349 | |||
350 | |||
351 | ; we go in normalbeg2 because *(ushf*)(match+best_len-1) == scan_end | ||
352 | |||
353 | normalbeg2: | ||
354 | |||
355 | ; 10 nop here take 10% time | ||
356 | mov edi,window | ||
357 | ;mov chain_length,eax ; now, we need eax... | ||
358 | |||
359 | cmp bp,word ptr[edi+edx] | ||
360 | jne contloop3 ; if *(ushf*)match != scan_start, continue | ||
361 | |||
362 | iseq: | ||
363 | |||
364 | mov edi,eax | ||
365 | mov esi,scanrp ; esi = scan | ||
366 | add edi,edx ; edi = window + cur_match = match | ||
367 | |||
368 | |||
369 | mov eax,[esi+3] ; compare manually dword at match+3 | ||
370 | xor eax,[edi+3] ; and scan +3 | ||
371 | |||
372 | jz begincompare ; if equal, go to long compare | ||
373 | |||
374 | ; we will determine the unmatch byte and calculate len (in esi) | ||
375 | or al,al | ||
376 | je eq1rr | ||
377 | mov esi,3 | ||
378 | jmp trfinval | ||
379 | eq1rr: | ||
380 | or ax,ax | ||
381 | je eq1 | ||
382 | |||
383 | mov esi,4 | ||
384 | jmp trfinval | ||
385 | eq1: | ||
386 | shl eax,8 | ||
387 | jz eq11 | ||
388 | mov esi,5 | ||
389 | jmp trfinval | ||
390 | eq11: | ||
391 | mov esi,6 | ||
392 | jmp trfinval | ||
393 | |||
394 | begincompare: | ||
395 | ; here we now scan and match begin same | ||
396 | add edi,6 | ||
397 | add esi,6 | ||
398 | mov ecx,(MAX_MATCH-(2+4))/4 ;//; scan for at most MAX_MATCH bytes | ||
399 | repe cmpsd ;//; loop until mismatch | ||
400 | |||
401 | je trfin ; go to trfin if not unmatch | ||
402 | ; we determine the unmatch byte | ||
403 | sub esi,4 | ||
404 | mov eax,[edi-4] | ||
405 | xor eax,[esi] | ||
406 | or al,al | ||
407 | |||
408 | jnz trfin | ||
409 | inc esi | ||
410 | |||
411 | or ax,ax | ||
412 | jnz trfin | ||
413 | inc esi | ||
414 | |||
415 | shl eax,8 | ||
416 | jnz trfin | ||
417 | inc esi | ||
418 | |||
419 | trfin: | ||
420 | sub esi,scanrp ; esi = len | ||
421 | trfinval: | ||
422 | cmp esi,best_len ; if len <= best_len, go contloop2 | ||
423 | jbe contloop2 | ||
424 | |||
425 | mov best_len,esi ; len become best_len | ||
426 | |||
427 | mov match_start,edx | ||
428 | cmp esi,nice_match ;//; if esi >= nice_match, exit | ||
429 | mov ecx,scanrp | ||
430 | jae exitloop | ||
431 | add esi,window | ||
432 | add ecx,best_len | ||
433 | dec esi | ||
434 | mov windowlen,esi | ||
435 | mov bx,[ecx-1] | ||
436 | |||
437 | |||
438 | ; now we restore eax, ecx and esi, for the big loop : | ||
439 | contloop2: | ||
440 | mov esi,prev | ||
441 | mov ecx,limit | ||
442 | ;mov eax,chain_length | ||
443 | mov eax,window | ||
444 | jmp contloop3 | ||
445 | |||
446 | exitloop: | ||
447 | mov ebx,match_start | ||
448 | mov ebp,str_s | ||
449 | mov dword ptr [ebp+dep_match_start],ebx | ||
450 | mov eax,best_len | ||
451 | add esp,NbStackAdd | ||
452 | |||
453 | |||
454 | pop ebx | ||
455 | pop esi | ||
456 | pop edi | ||
457 | pop ebp | ||
458 | ret | ||
459 | |||
460 | _longest_match_asm7fff endp | ||
461 | |||
462 | _TEXT ends | ||
463 | end | ||
464 | \ No newline at end of file | ||
diff --git a/contrib/asm386/gvmat32c.c b/contrib/asm386/gvmat32c.c new file mode 100644 index 0000000..43d530b --- /dev/null +++ b/contrib/asm386/gvmat32c.c | |||
@@ -0,0 +1,229 @@ | |||
1 | /* gvmat32.c -- C portion of the optimized longest_match for 32 bits x86 | ||
2 | * Copyright (C) 1995-1996 Jean-loup Gailly and Gilles Vollant. | ||
3 | * File written by Gilles Vollant, by modifiying the longest_match | ||
4 | * from Jean-loup Gailly in deflate.c | ||
5 | * it prepare all parameters and call the assembly longest_match_gvasm | ||
6 | * longest_match execute standard C code is wmask != 0x7fff | ||
7 | * (assembly code is faster with a fixed wmask) | ||
8 | * | ||
9 | */ | ||
10 | //#pragma optimize("agt",on) | ||
11 | |||
12 | #include "deflate.h" | ||
13 | |||
14 | #undef FAR | ||
15 | #include <windows.h> | ||
16 | |||
17 | #ifdef ASMV | ||
18 | |||
19 | #define NIL 0 | ||
20 | |||
21 | static unsigned int tot=0; | ||
22 | static unsigned int totl0=0; | ||
23 | static unsigned int totl0p0=0; | ||
24 | static unsigned int ba0=0; | ||
25 | static unsigned int ba1=0; | ||
26 | static unsigned int cpta=0; | ||
27 | static unsigned int cptb=0; | ||
28 | |||
29 | #define UNALIGNED_OK | ||
30 | #define gvshow(a,b,c,d) | ||
31 | /* | ||
32 | void gvshow(int chain_length,int len,int limit,ushf* prev) | ||
33 | { | ||
34 | static int ival=0; | ||
35 | char sz[80]; | ||
36 | unsigned long i; | ||
37 | int prev0=*prev; | ||
38 | ival++; | ||
39 | //wsprintf(sz,"call %u, len=%u, chain_length=%u\n",ival,len,chain_length); | ||
40 | //OutputDebugString(sz); | ||
41 | tot++; | ||
42 | if (limit==NIL) | ||
43 | totl0++; | ||
44 | if ((limit==NIL) && (prev0==0)) | ||
45 | totl0p0++; | ||
46 | for (i=limit+1;i<32768;i++) | ||
47 | { | ||
48 | ush va=*(prev+i); | ||
49 | if (ba0>4000000000) | ||
50 | { | ||
51 | ba0+=10; | ||
52 | } | ||
53 | ba0++; | ||
54 | if ((va>limit) || (va==0)) | ||
55 | continue; | ||
56 | ba1++; | ||
57 | } | ||
58 | } | ||
59 | */ | ||
60 | |||
61 | |||
62 | /* if your C compiler don't add underline before function name, | ||
63 | define ADD_UNDERLINE_ASMFUNC */ | ||
64 | #ifdef ADD_UNDERLINE_ASMFUNC | ||
65 | #define longest_match_asm7fff _longest_match_asm7fff | ||
66 | #endif | ||
67 | void match_init() | ||
68 | { | ||
69 | } | ||
70 | |||
71 | uInt longest_match_c( | ||
72 | deflate_state *s, | ||
73 | IPos cur_match); /* current match */ | ||
74 | |||
75 | |||
76 | uInt longest_match_asm7fff( | ||
77 | deflate_state *s, | ||
78 | IPos cur_match); /* current match */ | ||
79 | |||
80 | uInt longest_match( | ||
81 | deflate_state *s, | ||
82 | IPos cur_match) /* current match */ | ||
83 | { | ||
84 | if (s->w_mask == 0x7fff) | ||
85 | return longest_match_asm7fff(s,cur_match); | ||
86 | return longest_match_c(s,cur_match); | ||
87 | } | ||
88 | |||
89 | |||
90 | |||
91 | uInt longest_match_c(s, cur_match) | ||
92 | deflate_state *s; | ||
93 | IPos cur_match; /* current match */ | ||
94 | { | ||
95 | unsigned chain_length = s->max_chain_length;/* max hash chain length */ | ||
96 | register Bytef *scan = s->window + s->strstart; /* current string */ | ||
97 | register Bytef *match; /* matched string */ | ||
98 | register int len; /* length of current match */ | ||
99 | int best_len = s->prev_length; /* best match length so far */ | ||
100 | int nice_match = s->nice_match; /* stop if match long enough */ | ||
101 | IPos limit = s->strstart > (IPos)MAX_DIST(s) ? | ||
102 | s->strstart - (IPos)MAX_DIST(s) : NIL; | ||
103 | /* Stop when cur_match becomes <= limit. To simplify the code, | ||
104 | * we prevent matches with the string of window index 0. | ||
105 | */ | ||
106 | Posf *prev = s->prev; | ||
107 | uInt wmask = s->w_mask; | ||
108 | |||
109 | #ifdef UNALIGNED_OK | ||
110 | /* Compare two bytes at a time. Note: this is not always beneficial. | ||
111 | * Try with and without -DUNALIGNED_OK to check. | ||
112 | */ | ||
113 | register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; | ||
114 | register ush scan_start = *(ushf*)scan; | ||
115 | register ush scan_end = *(ushf*)(scan+best_len-1); | ||
116 | #else | ||
117 | register Bytef *strend = s->window + s->strstart + MAX_MATCH; | ||
118 | register Byte scan_end1 = scan[best_len-1]; | ||
119 | register Byte scan_end = scan[best_len]; | ||
120 | #endif | ||
121 | |||
122 | /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. | ||
123 | * It is easy to get rid of this optimization if necessary. | ||
124 | */ | ||
125 | Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); | ||
126 | |||
127 | /* Do not waste too much time if we already have a good match: */ | ||
128 | if (s->prev_length >= s->good_match) { | ||
129 | chain_length >>= 2; | ||
130 | } | ||
131 | /* Do not look for matches beyond the end of the input. This is necessary | ||
132 | * to make deflate deterministic. | ||
133 | */ | ||
134 | if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; | ||
135 | |||
136 | Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); | ||
137 | |||
138 | do { | ||
139 | Assert(cur_match < s->strstart, "no future"); | ||
140 | match = s->window + cur_match; | ||
141 | |||
142 | /* Skip to next match if the match length cannot increase | ||
143 | * or if the match length is less than 2: | ||
144 | */ | ||
145 | #if (defined(UNALIGNED_OK) && MAX_MATCH == 258) | ||
146 | /* This code assumes sizeof(unsigned short) == 2. Do not use | ||
147 | * UNALIGNED_OK if your compiler uses a different size. | ||
148 | */ | ||
149 | if (*(ushf*)(match+best_len-1) != scan_end || | ||
150 | *(ushf*)match != scan_start) continue; | ||
151 | |||
152 | /* It is not necessary to compare scan[2] and match[2] since they are | ||
153 | * always equal when the other bytes match, given that the hash keys | ||
154 | * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at | ||
155 | * strstart+3, +5, ... up to strstart+257. We check for insufficient | ||
156 | * lookahead only every 4th comparison; the 128th check will be made | ||
157 | * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is | ||
158 | * necessary to put more guard bytes at the end of the window, or | ||
159 | * to check more often for insufficient lookahead. | ||
160 | */ | ||
161 | Assert(scan[2] == match[2], "scan[2]?"); | ||
162 | scan++, match++; | ||
163 | do { | ||
164 | } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) && | ||
165 | *(ushf*)(scan+=2) == *(ushf*)(match+=2) && | ||
166 | *(ushf*)(scan+=2) == *(ushf*)(match+=2) && | ||
167 | *(ushf*)(scan+=2) == *(ushf*)(match+=2) && | ||
168 | scan < strend); | ||
169 | /* The funny "do {}" generates better code on most compilers */ | ||
170 | |||
171 | /* Here, scan <= window+strstart+257 */ | ||
172 | Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); | ||
173 | if (*scan == *match) scan++; | ||
174 | |||
175 | len = (MAX_MATCH - 1) - (int)(strend-scan); | ||
176 | scan = strend - (MAX_MATCH-1); | ||
177 | |||
178 | #else /* UNALIGNED_OK */ | ||
179 | |||
180 | if (match[best_len] != scan_end || | ||
181 | match[best_len-1] != scan_end1 || | ||
182 | *match != *scan || | ||
183 | *++match != scan[1]) continue; | ||
184 | |||
185 | /* The check at best_len-1 can be removed because it will be made | ||
186 | * again later. (This heuristic is not always a win.) | ||
187 | * It is not necessary to compare scan[2] and match[2] since they | ||
188 | * are always equal when the other bytes match, given that | ||
189 | * the hash keys are equal and that HASH_BITS >= 8. | ||
190 | */ | ||
191 | scan += 2, match++; | ||
192 | Assert(*scan == *match, "match[2]?"); | ||
193 | |||
194 | /* We check for insufficient lookahead only every 8th comparison; | ||
195 | * the 256th check will be made at strstart+258. | ||
196 | */ | ||
197 | do { | ||
198 | } while (*++scan == *++match && *++scan == *++match && | ||
199 | *++scan == *++match && *++scan == *++match && | ||
200 | *++scan == *++match && *++scan == *++match && | ||
201 | *++scan == *++match && *++scan == *++match && | ||
202 | scan < strend); | ||
203 | |||
204 | Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); | ||
205 | |||
206 | len = MAX_MATCH - (int)(strend - scan); | ||
207 | scan = strend - MAX_MATCH; | ||
208 | |||
209 | #endif /* UNALIGNED_OK */ | ||
210 | |||
211 | if (len > best_len) { | ||
212 | s->match_start = cur_match; | ||
213 | best_len = len; | ||
214 | if (len >= nice_match) break; | ||
215 | #ifdef UNALIGNED_OK | ||
216 | scan_end = *(ushf*)(scan+best_len-1); | ||
217 | #else | ||
218 | scan_end1 = scan[best_len-1]; | ||
219 | scan_end = scan[best_len]; | ||
220 | #endif | ||
221 | } | ||
222 | } while ((cur_match = prev[cur_match & wmask]) > limit | ||
223 | && --chain_length != 0); | ||
224 | |||
225 | if ((uInt)best_len <= s->lookahead) return best_len; | ||
226 | return s->lookahead; | ||
227 | } | ||
228 | |||
229 | #endif /* ASMV */ | ||
diff --git a/contrib/asm386/mkgvmt32.bat b/contrib/asm386/mkgvmt32.bat new file mode 100644 index 0000000..6c5ffd7 --- /dev/null +++ b/contrib/asm386/mkgvmt32.bat | |||
@@ -0,0 +1 @@ | |||
c:\masm611\bin\ml /coff /Zi /c /Flgvmat32.lst gvmat32.asm | |||
diff --git a/contrib/asm386/zlibvc.mak b/contrib/asm386/zlibvc.mak new file mode 100644 index 0000000..ae3d14b --- /dev/null +++ b/contrib/asm386/zlibvc.mak | |||
@@ -0,0 +1,781 @@ | |||
1 | # Microsoft Developer Studio Generated NMAKE File, Format Version 4.20 | ||
2 | # ** DO NOT EDIT ** | ||
3 | |||
4 | # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 | ||
5 | |||
6 | !IF "$(CFG)" == "" | ||
7 | CFG=zlibvc - Win32 Debug | ||
8 | !MESSAGE No configuration specified. Defaulting to zlibvc - Win32 Debug. | ||
9 | !ENDIF | ||
10 | |||
11 | !IF "$(CFG)" != "zlibvc - Win32 Release" && "$(CFG)" != "zlibvc - Win32 Debug" | ||
12 | !MESSAGE Invalid configuration "$(CFG)" specified. | ||
13 | !MESSAGE You can specify a configuration when running NMAKE on this makefile | ||
14 | !MESSAGE by defining the macro CFG on the command line. For example: | ||
15 | !MESSAGE | ||
16 | !MESSAGE NMAKE /f "zlibvc.mak" CFG="zlibvc - Win32 Debug" | ||
17 | !MESSAGE | ||
18 | !MESSAGE Possible choices for configuration are: | ||
19 | !MESSAGE | ||
20 | !MESSAGE "zlibvc - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") | ||
21 | !MESSAGE "zlibvc - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") | ||
22 | !MESSAGE | ||
23 | !ERROR An invalid configuration is specified. | ||
24 | !ENDIF | ||
25 | |||
26 | !IF "$(OS)" == "Windows_NT" | ||
27 | NULL= | ||
28 | !ELSE | ||
29 | NULL=nul | ||
30 | !ENDIF | ||
31 | ################################################################################ | ||
32 | # Begin Project | ||
33 | # PROP Target_Last_Scanned "zlibvc - Win32 Debug" | ||
34 | CPP=cl.exe | ||
35 | RSC=rc.exe | ||
36 | MTL=mktyplib.exe | ||
37 | |||
38 | !IF "$(CFG)" == "zlibvc - Win32 Release" | ||
39 | |||
40 | # PROP BASE Use_MFC 0 | ||
41 | # PROP BASE Use_Debug_Libraries 0 | ||
42 | # PROP BASE Output_Dir "Release" | ||
43 | # PROP BASE Intermediate_Dir "Release" | ||
44 | # PROP BASE Target_Dir "" | ||
45 | # PROP Use_MFC 0 | ||
46 | # PROP Use_Debug_Libraries 0 | ||
47 | # PROP Output_Dir "Release" | ||
48 | # PROP Intermediate_Dir "Release" | ||
49 | # PROP Target_Dir "" | ||
50 | OUTDIR=.\Release | ||
51 | INTDIR=.\Release | ||
52 | |||
53 | ALL : "$(OUTDIR)\zlib.dll" "$(OUTDIR)\zlibvc.bsc" | ||
54 | |||
55 | CLEAN : | ||
56 | -@erase "$(INTDIR)\adler32.obj" | ||
57 | -@erase "$(INTDIR)\adler32.sbr" | ||
58 | -@erase "$(INTDIR)\compress.obj" | ||
59 | -@erase "$(INTDIR)\compress.sbr" | ||
60 | -@erase "$(INTDIR)\crc32.obj" | ||
61 | -@erase "$(INTDIR)\crc32.sbr" | ||
62 | -@erase "$(INTDIR)\deflate.obj" | ||
63 | -@erase "$(INTDIR)\deflate.sbr" | ||
64 | -@erase "$(INTDIR)\gvmat32c.obj" | ||
65 | -@erase "$(INTDIR)\gvmat32c.sbr" | ||
66 | -@erase "$(INTDIR)\gzio.obj" | ||
67 | -@erase "$(INTDIR)\gzio.sbr" | ||
68 | -@erase "$(INTDIR)\infblock.obj" | ||
69 | -@erase "$(INTDIR)\infblock.sbr" | ||
70 | -@erase "$(INTDIR)\infcodes.obj" | ||
71 | -@erase "$(INTDIR)\infcodes.sbr" | ||
72 | -@erase "$(INTDIR)\inffast.obj" | ||
73 | -@erase "$(INTDIR)\inffast.sbr" | ||
74 | -@erase "$(INTDIR)\inflate.obj" | ||
75 | -@erase "$(INTDIR)\inflate.sbr" | ||
76 | -@erase "$(INTDIR)\inftrees.obj" | ||
77 | -@erase "$(INTDIR)\inftrees.sbr" | ||
78 | -@erase "$(INTDIR)\infutil.obj" | ||
79 | -@erase "$(INTDIR)\infutil.sbr" | ||
80 | -@erase "$(INTDIR)\trees.obj" | ||
81 | -@erase "$(INTDIR)\trees.sbr" | ||
82 | -@erase "$(INTDIR)\uncompr.obj" | ||
83 | -@erase "$(INTDIR)\uncompr.sbr" | ||
84 | -@erase "$(INTDIR)\zlib.res" | ||
85 | -@erase "$(INTDIR)\zutil.obj" | ||
86 | -@erase "$(INTDIR)\zutil.sbr" | ||
87 | -@erase "$(OUTDIR)\zlib.dll" | ||
88 | -@erase "$(OUTDIR)\zlib.exp" | ||
89 | -@erase "$(OUTDIR)\zlib.lib" | ||
90 | -@erase "$(OUTDIR)\zlib.map" | ||
91 | -@erase "$(OUTDIR)\zlibvc.bsc" | ||
92 | |||
93 | "$(OUTDIR)" : | ||
94 | if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" | ||
95 | |||
96 | # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c | ||
97 | # ADD CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D fdopen=_fdopen /D "WIN32" /D "_WINDOWS" /D "_WINDLL" /D "_WIN32" /D "BUILD_ZLIBDLL" /D "ZLIB_DLL" /D "ASMV" /FR /YX /c | ||
98 | CPP_PROJ=/nologo /MT /W3 /GX /O2 /D "NDEBUG" /D fdopen=_fdopen /D "WIN32" /D\ | ||
99 | "_WINDOWS" /D "_WINDLL" /D "_WIN32" /D "BUILD_ZLIBDLL" /D "ZLIB_DLL" /D "ASMV"\ | ||
100 | /FR"$(INTDIR)/" /Fp"$(INTDIR)/zlibvc.pch" /YX /Fo"$(INTDIR)/" /c | ||
101 | CPP_OBJS=.\Release/ | ||
102 | CPP_SBRS=.\Release/ | ||
103 | # ADD BASE MTL /nologo /D "NDEBUG" /win32 | ||
104 | # ADD MTL /nologo /D "NDEBUG" /win32 | ||
105 | MTL_PROJ=/nologo /D "NDEBUG" /win32 | ||
106 | # ADD BASE RSC /l 0x40c /d "NDEBUG" | ||
107 | # ADD RSC /l 0x40c /d "NDEBUG" | ||
108 | RSC_PROJ=/l 0x40c /fo"$(INTDIR)/zlib.res" /d "NDEBUG" | ||
109 | BSC32=bscmake.exe | ||
110 | # ADD BASE BSC32 /nologo | ||
111 | # ADD BSC32 /nologo | ||
112 | BSC32_FLAGS=/nologo /o"$(OUTDIR)/zlibvc.bsc" | ||
113 | BSC32_SBRS= \ | ||
114 | "$(INTDIR)\adler32.sbr" \ | ||
115 | "$(INTDIR)\compress.sbr" \ | ||
116 | "$(INTDIR)\crc32.sbr" \ | ||
117 | "$(INTDIR)\deflate.sbr" \ | ||
118 | "$(INTDIR)\gvmat32c.sbr" \ | ||
119 | "$(INTDIR)\gzio.sbr" \ | ||
120 | "$(INTDIR)\infblock.sbr" \ | ||
121 | "$(INTDIR)\infcodes.sbr" \ | ||
122 | "$(INTDIR)\inffast.sbr" \ | ||
123 | "$(INTDIR)\inflate.sbr" \ | ||
124 | "$(INTDIR)\inftrees.sbr" \ | ||
125 | "$(INTDIR)\infutil.sbr" \ | ||
126 | "$(INTDIR)\trees.sbr" \ | ||
127 | "$(INTDIR)\uncompr.sbr" \ | ||
128 | "$(INTDIR)\zutil.sbr" | ||
129 | |||
130 | "$(OUTDIR)\zlibvc.bsc" : "$(OUTDIR)" $(BSC32_SBRS) | ||
131 | $(BSC32) @<< | ||
132 | $(BSC32_FLAGS) $(BSC32_SBRS) | ||
133 | << | ||
134 | |||
135 | LINK32=link.exe | ||
136 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 | ||
137 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib crtdll.lib /nologo /subsystem:windows /dll /map /machine:I386 /nodefaultlib /out:"Release/zlib.dll" | ||
138 | LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ | ||
139 | advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib crtdll.lib /nologo\ | ||
140 | /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)/zlib.pdb"\ | ||
141 | /map:"$(INTDIR)/zlib.map" /machine:I386 /nodefaultlib /def:".\zlib.def"\ | ||
142 | /out:"$(OUTDIR)/zlib.dll" /implib:"$(OUTDIR)/zlib.lib" | ||
143 | DEF_FILE= \ | ||
144 | ".\zlib.def" | ||
145 | LINK32_OBJS= \ | ||
146 | "$(INTDIR)\adler32.obj" \ | ||
147 | "$(INTDIR)\compress.obj" \ | ||
148 | "$(INTDIR)\crc32.obj" \ | ||
149 | "$(INTDIR)\deflate.obj" \ | ||
150 | "$(INTDIR)\gvmat32c.obj" \ | ||
151 | "$(INTDIR)\gzio.obj" \ | ||
152 | "$(INTDIR)\infblock.obj" \ | ||
153 | "$(INTDIR)\infcodes.obj" \ | ||
154 | "$(INTDIR)\inffast.obj" \ | ||
155 | "$(INTDIR)\inflate.obj" \ | ||
156 | "$(INTDIR)\inftrees.obj" \ | ||
157 | "$(INTDIR)\infutil.obj" \ | ||
158 | "$(INTDIR)\trees.obj" \ | ||
159 | "$(INTDIR)\uncompr.obj" \ | ||
160 | "$(INTDIR)\zlib.res" \ | ||
161 | "$(INTDIR)\zutil.obj" \ | ||
162 | ".\GVMAT32.obj" | ||
163 | |||
164 | "$(OUTDIR)\zlib.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) | ||
165 | $(LINK32) @<< | ||
166 | $(LINK32_FLAGS) $(LINK32_OBJS) | ||
167 | << | ||
168 | |||
169 | !ELSEIF "$(CFG)" == "zlibvc - Win32 Debug" | ||
170 | |||
171 | # PROP BASE Use_MFC 0 | ||
172 | # PROP BASE Use_Debug_Libraries 1 | ||
173 | # PROP BASE Output_Dir "Debug" | ||
174 | # PROP BASE Intermediate_Dir "Debug" | ||
175 | # PROP BASE Target_Dir "" | ||
176 | # PROP Use_MFC 0 | ||
177 | # PROP Use_Debug_Libraries 1 | ||
178 | # PROP Output_Dir "Debug" | ||
179 | # PROP Intermediate_Dir "Debug" | ||
180 | # PROP Target_Dir "" | ||
181 | OUTDIR=.\Debug | ||
182 | INTDIR=.\Debug | ||
183 | |||
184 | ALL : "$(OUTDIR)\zlib.dll" | ||
185 | |||
186 | CLEAN : | ||
187 | -@erase "$(INTDIR)\adler32.obj" | ||
188 | -@erase "$(INTDIR)\compress.obj" | ||
189 | -@erase "$(INTDIR)\crc32.obj" | ||
190 | -@erase "$(INTDIR)\deflate.obj" | ||
191 | -@erase "$(INTDIR)\gvmat32c.obj" | ||
192 | -@erase "$(INTDIR)\gzio.obj" | ||
193 | -@erase "$(INTDIR)\infblock.obj" | ||
194 | -@erase "$(INTDIR)\infcodes.obj" | ||
195 | -@erase "$(INTDIR)\inffast.obj" | ||
196 | -@erase "$(INTDIR)\inflate.obj" | ||
197 | -@erase "$(INTDIR)\inftrees.obj" | ||
198 | -@erase "$(INTDIR)\infutil.obj" | ||
199 | -@erase "$(INTDIR)\trees.obj" | ||
200 | -@erase "$(INTDIR)\uncompr.obj" | ||
201 | -@erase "$(INTDIR)\vc40.idb" | ||
202 | -@erase "$(INTDIR)\vc40.pdb" | ||
203 | -@erase "$(INTDIR)\zlib.res" | ||
204 | -@erase "$(INTDIR)\zutil.obj" | ||
205 | -@erase "$(OUTDIR)\zlib.dll" | ||
206 | -@erase "$(OUTDIR)\zlib.exp" | ||
207 | -@erase "$(OUTDIR)\zlib.ilk" | ||
208 | -@erase "$(OUTDIR)\zlib.lib" | ||
209 | -@erase "$(OUTDIR)\zlib.pdb" | ||
210 | |||
211 | "$(OUTDIR)" : | ||
212 | if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" | ||
213 | |||
214 | # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c | ||
215 | # ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINDLL" /D "_WIN32" /D "BUILD_ZLIBDLL" /D "ZLIB_DLL" /YX /c | ||
216 | CPP_PROJ=/nologo /MTd /W3 /Gm /GX /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS"\ | ||
217 | /D "_WINDLL" /D "_WIN32" /D "BUILD_ZLIBDLL" /D "ZLIB_DLL"\ | ||
218 | /Fp"$(INTDIR)/zlibvc.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c | ||
219 | CPP_OBJS=.\Debug/ | ||
220 | CPP_SBRS=.\. | ||
221 | # ADD BASE MTL /nologo /D "_DEBUG" /win32 | ||
222 | # ADD MTL /nologo /D "_DEBUG" /win32 | ||
223 | MTL_PROJ=/nologo /D "_DEBUG" /win32 | ||
224 | # ADD BASE RSC /l 0x40c /d "_DEBUG" | ||
225 | # ADD RSC /l 0x40c /d "_DEBUG" | ||
226 | RSC_PROJ=/l 0x40c /fo"$(INTDIR)/zlib.res" /d "_DEBUG" | ||
227 | BSC32=bscmake.exe | ||
228 | # ADD BASE BSC32 /nologo | ||
229 | # ADD BSC32 /nologo | ||
230 | BSC32_FLAGS=/nologo /o"$(OUTDIR)/zlibvc.bsc" | ||
231 | BSC32_SBRS= \ | ||
232 | |||
233 | LINK32=link.exe | ||
234 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 | ||
235 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"Debug/zlib.dll" | ||
236 | LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ | ||
237 | advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\ | ||
238 | /subsystem:windows /dll /incremental:yes /pdb:"$(OUTDIR)/zlib.pdb" /debug\ | ||
239 | /machine:I386 /def:".\zlib.def" /out:"$(OUTDIR)/zlib.dll"\ | ||
240 | /implib:"$(OUTDIR)/zlib.lib" | ||
241 | DEF_FILE= \ | ||
242 | ".\zlib.def" | ||
243 | LINK32_OBJS= \ | ||
244 | "$(INTDIR)\adler32.obj" \ | ||
245 | "$(INTDIR)\compress.obj" \ | ||
246 | "$(INTDIR)\crc32.obj" \ | ||
247 | "$(INTDIR)\deflate.obj" \ | ||
248 | "$(INTDIR)\gvmat32c.obj" \ | ||
249 | "$(INTDIR)\gzio.obj" \ | ||
250 | "$(INTDIR)\infblock.obj" \ | ||
251 | "$(INTDIR)\infcodes.obj" \ | ||
252 | "$(INTDIR)\inffast.obj" \ | ||
253 | "$(INTDIR)\inflate.obj" \ | ||
254 | "$(INTDIR)\inftrees.obj" \ | ||
255 | "$(INTDIR)\infutil.obj" \ | ||
256 | "$(INTDIR)\trees.obj" \ | ||
257 | "$(INTDIR)\uncompr.obj" \ | ||
258 | "$(INTDIR)\zlib.res" \ | ||
259 | "$(INTDIR)\zutil.obj" \ | ||
260 | ".\GVMAT32.obj" | ||
261 | |||
262 | "$(OUTDIR)\zlib.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) | ||
263 | $(LINK32) @<< | ||
264 | $(LINK32_FLAGS) $(LINK32_OBJS) | ||
265 | << | ||
266 | |||
267 | !ENDIF | ||
268 | |||
269 | .c{$(CPP_OBJS)}.obj: | ||
270 | $(CPP) $(CPP_PROJ) $< | ||
271 | |||
272 | .cpp{$(CPP_OBJS)}.obj: | ||
273 | $(CPP) $(CPP_PROJ) $< | ||
274 | |||
275 | .cxx{$(CPP_OBJS)}.obj: | ||
276 | $(CPP) $(CPP_PROJ) $< | ||
277 | |||
278 | .c{$(CPP_SBRS)}.sbr: | ||
279 | $(CPP) $(CPP_PROJ) $< | ||
280 | |||
281 | .cpp{$(CPP_SBRS)}.sbr: | ||
282 | $(CPP) $(CPP_PROJ) $< | ||
283 | |||
284 | .cxx{$(CPP_SBRS)}.sbr: | ||
285 | $(CPP) $(CPP_PROJ) $< | ||
286 | |||
287 | ################################################################################ | ||
288 | # Begin Target | ||
289 | |||
290 | # Name "zlibvc - Win32 Release" | ||
291 | # Name "zlibvc - Win32 Debug" | ||
292 | |||
293 | !IF "$(CFG)" == "zlibvc - Win32 Release" | ||
294 | |||
295 | !ELSEIF "$(CFG)" == "zlibvc - Win32 Debug" | ||
296 | |||
297 | !ENDIF | ||
298 | |||
299 | ################################################################################ | ||
300 | # Begin Source File | ||
301 | |||
302 | SOURCE=.\adler32.c | ||
303 | DEP_CPP_ADLER=\ | ||
304 | ".\zconf.h"\ | ||
305 | ".\zlib.h"\ | ||
306 | |||
307 | |||
308 | !IF "$(CFG)" == "zlibvc - Win32 Release" | ||
309 | |||
310 | |||
311 | "$(INTDIR)\adler32.obj" : $(SOURCE) $(DEP_CPP_ADLER) "$(INTDIR)" | ||
312 | |||
313 | "$(INTDIR)\adler32.sbr" : $(SOURCE) $(DEP_CPP_ADLER) "$(INTDIR)" | ||
314 | |||
315 | |||
316 | !ELSEIF "$(CFG)" == "zlibvc - Win32 Debug" | ||
317 | |||
318 | |||
319 | "$(INTDIR)\adler32.obj" : $(SOURCE) $(DEP_CPP_ADLER) "$(INTDIR)" | ||
320 | |||
321 | |||
322 | !ENDIF | ||
323 | |||
324 | # End Source File | ||
325 | ################################################################################ | ||
326 | # Begin Source File | ||
327 | |||
328 | SOURCE=.\compress.c | ||
329 | DEP_CPP_COMPR=\ | ||
330 | ".\zconf.h"\ | ||
331 | ".\zlib.h"\ | ||
332 | |||
333 | |||
334 | !IF "$(CFG)" == "zlibvc - Win32 Release" | ||
335 | |||
336 | |||
337 | "$(INTDIR)\compress.obj" : $(SOURCE) $(DEP_CPP_COMPR) "$(INTDIR)" | ||
338 | |||
339 | "$(INTDIR)\compress.sbr" : $(SOURCE) $(DEP_CPP_COMPR) "$(INTDIR)" | ||
340 | |||
341 | |||
342 | !ELSEIF "$(CFG)" == "zlibvc - Win32 Debug" | ||
343 | |||
344 | |||
345 | "$(INTDIR)\compress.obj" : $(SOURCE) $(DEP_CPP_COMPR) "$(INTDIR)" | ||
346 | |||
347 | |||
348 | !ENDIF | ||
349 | |||
350 | # End Source File | ||
351 | ################################################################################ | ||
352 | # Begin Source File | ||
353 | |||
354 | SOURCE=.\crc32.c | ||
355 | DEP_CPP_CRC32=\ | ||
356 | ".\zconf.h"\ | ||
357 | ".\zlib.h"\ | ||
358 | |||
359 | |||
360 | !IF "$(CFG)" == "zlibvc - Win32 Release" | ||
361 | |||
362 | |||
363 | "$(INTDIR)\crc32.obj" : $(SOURCE) $(DEP_CPP_CRC32) "$(INTDIR)" | ||
364 | |||
365 | "$(INTDIR)\crc32.sbr" : $(SOURCE) $(DEP_CPP_CRC32) "$(INTDIR)" | ||
366 | |||
367 | |||
368 | !ELSEIF "$(CFG)" == "zlibvc - Win32 Debug" | ||
369 | |||
370 | |||
371 | "$(INTDIR)\crc32.obj" : $(SOURCE) $(DEP_CPP_CRC32) "$(INTDIR)" | ||
372 | |||
373 | |||
374 | !ENDIF | ||
375 | |||
376 | # End Source File | ||
377 | ################################################################################ | ||
378 | # Begin Source File | ||
379 | |||
380 | SOURCE=.\deflate.c | ||
381 | |||
382 | !IF "$(CFG)" == "zlibvc - Win32 Release" | ||
383 | |||
384 | DEP_CPP_DEFLA=\ | ||
385 | ".\deflate.h"\ | ||
386 | ".\zconf.h"\ | ||
387 | ".\zlib.h"\ | ||
388 | ".\zutil.h"\ | ||
389 | |||
390 | |||
391 | "$(INTDIR)\deflate.obj" : $(SOURCE) $(DEP_CPP_DEFLA) "$(INTDIR)" | ||
392 | |||
393 | "$(INTDIR)\deflate.sbr" : $(SOURCE) $(DEP_CPP_DEFLA) "$(INTDIR)" | ||
394 | |||
395 | |||
396 | !ELSEIF "$(CFG)" == "zlibvc - Win32 Debug" | ||
397 | |||
398 | DEP_CPP_DEFLA=\ | ||
399 | ".\deflate.h"\ | ||
400 | ".\zconf.h"\ | ||
401 | ".\zlib.h"\ | ||
402 | ".\zutil.h"\ | ||
403 | |||
404 | NODEP_CPP_DEFLA=\ | ||
405 | ".\local"\ | ||
406 | |||
407 | |||
408 | "$(INTDIR)\deflate.obj" : $(SOURCE) $(DEP_CPP_DEFLA) "$(INTDIR)" | ||
409 | |||
410 | |||
411 | !ENDIF | ||
412 | |||
413 | # End Source File | ||
414 | ################################################################################ | ||
415 | # Begin Source File | ||
416 | |||
417 | SOURCE=.\gzio.c | ||
418 | DEP_CPP_GZIO_=\ | ||
419 | ".\zconf.h"\ | ||
420 | ".\zlib.h"\ | ||
421 | ".\zutil.h"\ | ||
422 | |||
423 | |||
424 | !IF "$(CFG)" == "zlibvc - Win32 Release" | ||
425 | |||
426 | |||
427 | "$(INTDIR)\gzio.obj" : $(SOURCE) $(DEP_CPP_GZIO_) "$(INTDIR)" | ||
428 | |||
429 | "$(INTDIR)\gzio.sbr" : $(SOURCE) $(DEP_CPP_GZIO_) "$(INTDIR)" | ||
430 | |||
431 | |||
432 | !ELSEIF "$(CFG)" == "zlibvc - Win32 Debug" | ||
433 | |||
434 | |||
435 | "$(INTDIR)\gzio.obj" : $(SOURCE) $(DEP_CPP_GZIO_) "$(INTDIR)" | ||
436 | |||
437 | |||
438 | !ENDIF | ||
439 | |||
440 | # End Source File | ||
441 | ################################################################################ | ||
442 | # Begin Source File | ||
443 | |||
444 | SOURCE=.\infblock.c | ||
445 | DEP_CPP_INFBL=\ | ||
446 | ".\infblock.h"\ | ||
447 | ".\infcodes.h"\ | ||
448 | ".\inftrees.h"\ | ||
449 | ".\infutil.h"\ | ||
450 | ".\zconf.h"\ | ||
451 | ".\zlib.h"\ | ||
452 | ".\zutil.h"\ | ||
453 | |||
454 | |||
455 | !IF "$(CFG)" == "zlibvc - Win32 Release" | ||
456 | |||
457 | |||
458 | "$(INTDIR)\infblock.obj" : $(SOURCE) $(DEP_CPP_INFBL) "$(INTDIR)" | ||
459 | |||
460 | "$(INTDIR)\infblock.sbr" : $(SOURCE) $(DEP_CPP_INFBL) "$(INTDIR)" | ||
461 | |||
462 | |||
463 | !ELSEIF "$(CFG)" == "zlibvc - Win32 Debug" | ||
464 | |||
465 | |||
466 | "$(INTDIR)\infblock.obj" : $(SOURCE) $(DEP_CPP_INFBL) "$(INTDIR)" | ||
467 | |||
468 | |||
469 | !ENDIF | ||
470 | |||
471 | # End Source File | ||
472 | ################################################################################ | ||
473 | # Begin Source File | ||
474 | |||
475 | SOURCE=.\infcodes.c | ||
476 | DEP_CPP_INFCO=\ | ||
477 | ".\infblock.h"\ | ||
478 | ".\infcodes.h"\ | ||
479 | ".\inffast.h"\ | ||
480 | ".\inftrees.h"\ | ||
481 | ".\infutil.h"\ | ||
482 | ".\zconf.h"\ | ||
483 | ".\zlib.h"\ | ||
484 | ".\zutil.h"\ | ||
485 | |||
486 | |||
487 | !IF "$(CFG)" == "zlibvc - Win32 Release" | ||
488 | |||
489 | |||
490 | "$(INTDIR)\infcodes.obj" : $(SOURCE) $(DEP_CPP_INFCO) "$(INTDIR)" | ||
491 | |||
492 | "$(INTDIR)\infcodes.sbr" : $(SOURCE) $(DEP_CPP_INFCO) "$(INTDIR)" | ||
493 | |||
494 | |||
495 | !ELSEIF "$(CFG)" == "zlibvc - Win32 Debug" | ||
496 | |||
497 | |||
498 | "$(INTDIR)\infcodes.obj" : $(SOURCE) $(DEP_CPP_INFCO) "$(INTDIR)" | ||
499 | |||
500 | |||
501 | !ENDIF | ||
502 | |||
503 | # End Source File | ||
504 | ################################################################################ | ||
505 | # Begin Source File | ||
506 | |||
507 | SOURCE=.\inffast.c | ||
508 | DEP_CPP_INFFA=\ | ||
509 | ".\infblock.h"\ | ||
510 | ".\infcodes.h"\ | ||
511 | ".\inffast.h"\ | ||
512 | ".\inftrees.h"\ | ||
513 | ".\infutil.h"\ | ||
514 | ".\zconf.h"\ | ||
515 | ".\zlib.h"\ | ||
516 | ".\zutil.h"\ | ||
517 | |||
518 | |||
519 | !IF "$(CFG)" == "zlibvc - Win32 Release" | ||
520 | |||
521 | |||
522 | "$(INTDIR)\inffast.obj" : $(SOURCE) $(DEP_CPP_INFFA) "$(INTDIR)" | ||
523 | |||
524 | "$(INTDIR)\inffast.sbr" : $(SOURCE) $(DEP_CPP_INFFA) "$(INTDIR)" | ||
525 | |||
526 | |||
527 | !ELSEIF "$(CFG)" == "zlibvc - Win32 Debug" | ||
528 | |||
529 | |||
530 | "$(INTDIR)\inffast.obj" : $(SOURCE) $(DEP_CPP_INFFA) "$(INTDIR)" | ||
531 | |||
532 | |||
533 | !ENDIF | ||
534 | |||
535 | # End Source File | ||
536 | ################################################################################ | ||
537 | # Begin Source File | ||
538 | |||
539 | SOURCE=.\inflate.c | ||
540 | DEP_CPP_INFLA=\ | ||
541 | ".\infblock.h"\ | ||
542 | ".\zconf.h"\ | ||
543 | ".\zlib.h"\ | ||
544 | ".\zutil.h"\ | ||
545 | |||
546 | |||
547 | !IF "$(CFG)" == "zlibvc - Win32 Release" | ||
548 | |||
549 | |||
550 | "$(INTDIR)\inflate.obj" : $(SOURCE) $(DEP_CPP_INFLA) "$(INTDIR)" | ||
551 | |||
552 | "$(INTDIR)\inflate.sbr" : $(SOURCE) $(DEP_CPP_INFLA) "$(INTDIR)" | ||
553 | |||
554 | |||
555 | !ELSEIF "$(CFG)" == "zlibvc - Win32 Debug" | ||
556 | |||
557 | |||
558 | "$(INTDIR)\inflate.obj" : $(SOURCE) $(DEP_CPP_INFLA) "$(INTDIR)" | ||
559 | |||
560 | |||
561 | !ENDIF | ||
562 | |||
563 | # End Source File | ||
564 | ################################################################################ | ||
565 | # Begin Source File | ||
566 | |||
567 | SOURCE=.\inftrees.c | ||
568 | DEP_CPP_INFTR=\ | ||
569 | ".\inftrees.h"\ | ||
570 | ".\zconf.h"\ | ||
571 | ".\zlib.h"\ | ||
572 | ".\zutil.h"\ | ||
573 | |||
574 | |||
575 | !IF "$(CFG)" == "zlibvc - Win32 Release" | ||
576 | |||
577 | |||
578 | "$(INTDIR)\inftrees.obj" : $(SOURCE) $(DEP_CPP_INFTR) "$(INTDIR)" | ||
579 | |||
580 | "$(INTDIR)\inftrees.sbr" : $(SOURCE) $(DEP_CPP_INFTR) "$(INTDIR)" | ||
581 | |||
582 | |||
583 | !ELSEIF "$(CFG)" == "zlibvc - Win32 Debug" | ||
584 | |||
585 | |||
586 | "$(INTDIR)\inftrees.obj" : $(SOURCE) $(DEP_CPP_INFTR) "$(INTDIR)" | ||
587 | |||
588 | |||
589 | !ENDIF | ||
590 | |||
591 | # End Source File | ||
592 | ################################################################################ | ||
593 | # Begin Source File | ||
594 | |||
595 | SOURCE=.\infutil.c | ||
596 | DEP_CPP_INFUT=\ | ||
597 | ".\infblock.h"\ | ||
598 | ".\infcodes.h"\ | ||
599 | ".\inftrees.h"\ | ||
600 | ".\infutil.h"\ | ||
601 | ".\zconf.h"\ | ||
602 | ".\zlib.h"\ | ||
603 | ".\zutil.h"\ | ||
604 | |||
605 | |||
606 | !IF "$(CFG)" == "zlibvc - Win32 Release" | ||
607 | |||
608 | |||
609 | "$(INTDIR)\infutil.obj" : $(SOURCE) $(DEP_CPP_INFUT) "$(INTDIR)" | ||
610 | |||
611 | "$(INTDIR)\infutil.sbr" : $(SOURCE) $(DEP_CPP_INFUT) "$(INTDIR)" | ||
612 | |||
613 | |||
614 | !ELSEIF "$(CFG)" == "zlibvc - Win32 Debug" | ||
615 | |||
616 | |||
617 | "$(INTDIR)\infutil.obj" : $(SOURCE) $(DEP_CPP_INFUT) "$(INTDIR)" | ||
618 | |||
619 | |||
620 | !ENDIF | ||
621 | |||
622 | # End Source File | ||
623 | ################################################################################ | ||
624 | # Begin Source File | ||
625 | |||
626 | SOURCE=.\trees.c | ||
627 | DEP_CPP_TREES=\ | ||
628 | ".\deflate.h"\ | ||
629 | ".\zconf.h"\ | ||
630 | ".\zlib.h"\ | ||
631 | ".\zutil.h"\ | ||
632 | |||
633 | |||
634 | !IF "$(CFG)" == "zlibvc - Win32 Release" | ||
635 | |||
636 | |||
637 | "$(INTDIR)\trees.obj" : $(SOURCE) $(DEP_CPP_TREES) "$(INTDIR)" | ||
638 | |||
639 | "$(INTDIR)\trees.sbr" : $(SOURCE) $(DEP_CPP_TREES) "$(INTDIR)" | ||
640 | |||
641 | |||
642 | !ELSEIF "$(CFG)" == "zlibvc - Win32 Debug" | ||
643 | |||
644 | |||
645 | "$(INTDIR)\trees.obj" : $(SOURCE) $(DEP_CPP_TREES) "$(INTDIR)" | ||
646 | |||
647 | |||
648 | !ENDIF | ||
649 | |||
650 | # End Source File | ||
651 | ################################################################################ | ||
652 | # Begin Source File | ||
653 | |||
654 | SOURCE=.\uncompr.c | ||
655 | |||
656 | !IF "$(CFG)" == "zlibvc - Win32 Release" | ||
657 | |||
658 | DEP_CPP_UNCOM=\ | ||
659 | ".\zconf.h"\ | ||
660 | ".\zlib.h"\ | ||
661 | |||
662 | |||
663 | "$(INTDIR)\uncompr.obj" : $(SOURCE) $(DEP_CPP_UNCOM) "$(INTDIR)" | ||
664 | |||
665 | "$(INTDIR)\uncompr.sbr" : $(SOURCE) $(DEP_CPP_UNCOM) "$(INTDIR)" | ||
666 | |||
667 | |||
668 | !ELSEIF "$(CFG)" == "zlibvc - Win32 Debug" | ||
669 | |||
670 | DEP_CPP_UNCOM=\ | ||
671 | ".\zconf.h"\ | ||
672 | ".\zlib.h"\ | ||
673 | |||
674 | NODEP_CPP_UNCOM=\ | ||
675 | ".\uncompress"\ | ||
676 | |||
677 | |||
678 | "$(INTDIR)\uncompr.obj" : $(SOURCE) $(DEP_CPP_UNCOM) "$(INTDIR)" | ||
679 | |||
680 | |||
681 | !ENDIF | ||
682 | |||
683 | # End Source File | ||
684 | ################################################################################ | ||
685 | # Begin Source File | ||
686 | |||
687 | SOURCE=.\zutil.c | ||
688 | DEP_CPP_ZUTIL=\ | ||
689 | ".\zconf.h"\ | ||
690 | ".\zlib.h"\ | ||
691 | ".\zutil.h"\ | ||
692 | |||
693 | |||
694 | !IF "$(CFG)" == "zlibvc - Win32 Release" | ||
695 | |||
696 | |||
697 | "$(INTDIR)\zutil.obj" : $(SOURCE) $(DEP_CPP_ZUTIL) "$(INTDIR)" | ||
698 | |||
699 | "$(INTDIR)\zutil.sbr" : $(SOURCE) $(DEP_CPP_ZUTIL) "$(INTDIR)" | ||
700 | |||
701 | |||
702 | !ELSEIF "$(CFG)" == "zlibvc - Win32 Debug" | ||
703 | |||
704 | |||
705 | "$(INTDIR)\zutil.obj" : $(SOURCE) $(DEP_CPP_ZUTIL) "$(INTDIR)" | ||
706 | |||
707 | |||
708 | !ENDIF | ||
709 | |||
710 | # End Source File | ||
711 | ################################################################################ | ||
712 | # Begin Source File | ||
713 | |||
714 | SOURCE=.\zlib.rc | ||
715 | |||
716 | "$(INTDIR)\zlib.res" : $(SOURCE) "$(INTDIR)" | ||
717 | $(RSC) $(RSC_PROJ) $(SOURCE) | ||
718 | |||
719 | |||
720 | # End Source File | ||
721 | ################################################################################ | ||
722 | # Begin Source File | ||
723 | |||
724 | SOURCE=.\zlib.def | ||
725 | |||
726 | !IF "$(CFG)" == "zlibvc - Win32 Release" | ||
727 | |||
728 | !ELSEIF "$(CFG)" == "zlibvc - Win32 Debug" | ||
729 | |||
730 | !ENDIF | ||
731 | |||
732 | # End Source File | ||
733 | ################################################################################ | ||
734 | # Begin Source File | ||
735 | |||
736 | SOURCE=.\GVMAT32.obj | ||
737 | |||
738 | !IF "$(CFG)" == "zlibvc - Win32 Release" | ||
739 | |||
740 | !ELSEIF "$(CFG)" == "zlibvc - Win32 Debug" | ||
741 | |||
742 | !ENDIF | ||
743 | |||
744 | # End Source File | ||
745 | ################################################################################ | ||
746 | # Begin Source File | ||
747 | |||
748 | SOURCE=.\gvmat32c.c | ||
749 | |||
750 | !IF "$(CFG)" == "zlibvc - Win32 Release" | ||
751 | |||
752 | DEP_CPP_GVMAT=\ | ||
753 | ".\deflate.h"\ | ||
754 | ".\zconf.h"\ | ||
755 | ".\zlib.h"\ | ||
756 | ".\zutil.h"\ | ||
757 | |||
758 | |||
759 | "$(INTDIR)\gvmat32c.obj" : $(SOURCE) $(DEP_CPP_GVMAT) "$(INTDIR)" | ||
760 | |||
761 | "$(INTDIR)\gvmat32c.sbr" : $(SOURCE) $(DEP_CPP_GVMAT) "$(INTDIR)" | ||
762 | |||
763 | |||
764 | !ELSEIF "$(CFG)" == "zlibvc - Win32 Debug" | ||
765 | |||
766 | DEP_CPP_GVMAT=\ | ||
767 | ".\deflate.h"\ | ||
768 | ".\zconf.h"\ | ||
769 | ".\zlib.h"\ | ||
770 | ".\zutil.h"\ | ||
771 | |||
772 | |||
773 | "$(INTDIR)\gvmat32c.obj" : $(SOURCE) $(DEP_CPP_GVMAT) "$(INTDIR)" | ||
774 | |||
775 | |||
776 | !ENDIF | ||
777 | |||
778 | # End Source File | ||
779 | # End Target | ||
780 | # End Project | ||
781 | ################################################################################ | ||