| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
#if defined(ASMV) && (!defined(NOOLDPENTIUMCODE)) |
| 13 |
#include "deflate.h" |
| 14 |
|
| 15 |
|
| 16 |
|
| 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 |
|
| 24 |
unsigned long cpudetect32(); |
| 25 |
|
| 26 |
uInt longest_match_c( |
| 27 |
deflate_state *s, |
| 28 |
IPos cur_match); |
| 29 |
|
| 30 |
|
| 31 |
uInt longest_match_7fff( |
| 32 |
deflate_state *s, |
| 33 |
IPos cur_match); |
| 34 |
|
| 35 |
uInt longest_match_686( |
| 36 |
deflate_state *s, |
| 37 |
IPos cur_match); |
| 38 |
|
| 39 |
|
| 40 |
static uInt iIsPPro=2; |
| 41 |
|
| 42 |
void match_init () |
| 43 |
{ |
| 44 |
iIsPPro = (((cpudetect32()/0x100)&0xf)>=6) ? 1 : 0; |
| 45 |
} |
| 46 |
|
| 47 |
uInt longest_match( |
| 48 |
deflate_state *s, |
| 49 |
IPos cur_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 |
|
| 58 |
return longest_match_7fff(s,cur_match); |
| 59 |
} |
| 60 |
|
| 61 |
|
| 62 |
#endif |