summaryrefslogtreecommitdiff
path: root/contrib/masmx86/gvmat32c.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:32:36 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:32:36 -0700
commit67cc20d0041a32bee12bd9eb20ae218f91b73f77 (patch)
treed7e1b94bd15c30efd57cf9036f5fe89306b6bba0 /contrib/masmx86/gvmat32c.c
parent7751bd4c715ea8478113e34b49b5a794a4642e8e (diff)
downloadzlib-1.2.4-pre1.tar.gz
zlib-1.2.4-pre1.tar.bz2
zlib-1.2.4-pre1.zip
zlib 1.2.4-pre1v1.2.4-pre1
Diffstat (limited to 'contrib/masmx86/gvmat32c.c')
-rw-r--r--contrib/masmx86/gvmat32c.c62
1 files changed, 0 insertions, 62 deletions
diff --git a/contrib/masmx86/gvmat32c.c b/contrib/masmx86/gvmat32c.c
deleted file mode 100644
index 7ad2b27..0000000
--- a/contrib/masmx86/gvmat32c.c
+++ /dev/null
@@ -1,62 +0,0 @@
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 * Read comment at beginning of gvmat32.asm for more information
10 */
11
12#if defined(ASMV) && (!defined(NOOLDPENTIUMCODE))
13#include "deflate.h"
14
15/* if your C compiler don't add underline before function name,
16 define ADD_UNDERLINE_ASMFUNC */
17#ifdef ADD_UNDERLINE_ASMFUNC
18#define longest_match_7fff _longest_match_7fff
19#define longest_match_686 _longest_match_686
20#define cpudetect32 _cpudetect32
21#endif
22
23
24unsigned long cpudetect32();
25
26uInt longest_match_c(
27 deflate_state *s,
28 IPos cur_match); /* current match */
29
30
31uInt longest_match_7fff(
32 deflate_state *s,
33 IPos cur_match); /* current match */
34
35uInt longest_match_686(
36 deflate_state *s,
37 IPos cur_match); /* current match */
38
39
40static uInt iIsPPro=2;
41
42void match_init ()
43{
44 iIsPPro = (((cpudetect32()/0x100)&0xf)>=6) ? 1 : 0;
45}
46
47uInt longest_match(
48 deflate_state *s,
49 IPos cur_match) /* current match */
50{
51 if (iIsPPro!=0)
52 return longest_match_686(s,cur_match);
53
54 if (s->w_mask != 0x7fff)
55 return longest_match_686(s,cur_match);
56
57 /* now ((s->w_mask == 0x7fff) && (iIsPPro==0)) */
58 return longest_match_7fff(s,cur_match);
59}
60
61
62#endif /* defined(ASMV) && (!defined(NOOLDPENTIUMCODE)) */