summaryrefslogtreecommitdiff
path: root/contrib/inflate86
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:22:37 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:22:37 -0700
commit4b5a43a219d51066c01ff2ab86af18b967f2d0dd (patch)
tree4dcaf0cd18751d04cf638a9a6ec521990d4f2e90 /contrib/inflate86
parent086e982175da84b3db958191031380794315f95f (diff)
downloadzlib-1.2.0.5.tar.gz
zlib-1.2.0.5.tar.bz2
zlib-1.2.0.5.zip
zlib 1.2.0.5v1.2.0.5
Diffstat (limited to 'contrib/inflate86')
-rw-r--r--contrib/inflate86/inffast.S32
1 files changed, 16 insertions, 16 deletions
diff --git a/contrib/inflate86/inffast.S b/contrib/inflate86/inffast.S
index 3602907..f9bffd5 100644
--- a/contrib/inflate86/inffast.S
+++ b/contrib/inflate86/inffast.S
@@ -3,11 +3,11 @@
3 * 3 *
4 * inffast.c -- fast decoding 4 * inffast.c -- fast decoding
5 * Copyright (C) 1995-2003 Mark Adler 5 * Copyright (C) 1995-2003 Mark Adler
6 * For conditions of distribution and use, see copyright notice in zlib.h 6 * For conditions of distribution and use, see copyright notice in zlib.h
7 * 7 *
8 * Copyright (C) 2003 Chris Anderson <christop@charm.net> 8 * Copyright (C) 2003 Chris Anderson <christop@charm.net>
9 * Please use the copyright conditions above. 9 * Please use the copyright conditions above.
10 * 10 *
11 * This version (Jan-23-2003) of inflate_fast was coded and tested under 11 * This version (Jan-23-2003) of inflate_fast was coded and tested under
12 * GNU/Linux on a pentium 3, using the gcc-3.2 compiler distribution. On that 12 * GNU/Linux on a pentium 3, using the gcc-3.2 compiler distribution. On that
13 * machine, I found that gzip style archives decompressed about 20% faster than 13 * machine, I found that gzip style archives decompressed about 20% faster than
@@ -61,7 +61,7 @@
61 */ 61 */
62#if ! defined( GAS_COFF ) && ! defined( GAS_ELF ) 62#if ! defined( GAS_COFF ) && ! defined( GAS_ELF )
63 63
64#if defined( __CYGWIN__ ) 64#if defined( WIN32 ) || defined( __CYGWIN__ )
65#define GAS_COFF /* windows object format */ 65#define GAS_COFF /* windows object format */
66#else 66#else
67#define GAS_ELF 67#define GAS_ELF
@@ -151,14 +151,14 @@
151 */ 151 */
152#define mode_state 0 /* state->mode */ 152#define mode_state 0 /* state->mode */
153#define wsize_state 32 /* state->wsize */ 153#define wsize_state 32 /* state->wsize */
154#define write_state 36 /* state->write */ 154#define write_state 40 /* state->write */
155#define window_state 40 /* state->window */ 155#define window_state 44 /* state->window */
156#define hold_state 44 /* state->hold */ 156#define hold_state 48 /* state->hold */
157#define bits_state 48 /* state->bits */ 157#define bits_state 52 /* state->bits */
158#define lencode_state 64 /* state->lencode */ 158#define lencode_state 68 /* state->lencode */
159#define distcode_state 68 /* state->distcode */ 159#define distcode_state 72 /* state->distcode */
160#define lenbits_state 72 /* state->lenbits */ 160#define lenbits_state 76 /* state->lenbits */
161#define distbits_state 76 /* state->distbits */ 161#define distbits_state 80 /* state->distbits */
162 162
163/* 163/*
164 * inflate_fast's activation record 164 * inflate_fast's activation record
@@ -387,7 +387,7 @@ inflate_fast:
387 * bios may load a cpuid instruction and 387 * bios may load a cpuid instruction and
388 * cpuid may be disabled on Cyrix 5-6x86 */ 388 * cpuid may be disabled on Cyrix 5-6x86 */
389 popf 389 popf
390 pushf 390 pushf
391 popl %edx /* copy new eflags to edx */ 391 popl %edx /* copy new eflags to edx */
392 xorl %eax, %edx /* test if ID bit is flipped */ 392 xorl %eax, %edx /* test if ID bit is flipped */
393 jz .L_dont_use_mmx /* not flipped if zero */ 393 jz .L_dont_use_mmx /* not flipped if zero */
@@ -420,7 +420,7 @@ inflate_fast:
420 popl %eax 420 popl %eax
421 jmp .L_check_mmx 421 jmp .L_check_mmx
422#endif 422#endif
423 423
424 424
425/*** Non-MMX code ***/ 425/*** Non-MMX code ***/
426 426
@@ -443,7 +443,7 @@ inflate_fast:
443.L_do_loop: 443.L_do_loop:
444 /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out 444 /* regs: %esi = in, %ebp = hold, %bl = bits, %edi = out
445 * 445 *
446 * do { 446 * do {
447 * if (bits < 15) { 447 * if (bits < 15) {
448 * hold |= *((unsigned short *)in)++ << bits; 448 * hold |= *((unsigned short *)in)++ << bits;
449 * bits += 16 449 * bits += 16
@@ -900,7 +900,7 @@ inflate_fast:
900#define dmask_mm %mm5 900#define dmask_mm %mm5
901#define tmp_mm %mm6 901#define tmp_mm %mm6
902 902
903 movd lmask(%esp), lmask_mm 903 movd lmask(%esp), lmask_mm
904 movq lmask_mm, lmask2_mm 904 movq lmask_mm, lmask2_mm
905 movd dmask(%esp), dmask_mm 905 movd dmask(%esp), dmask_mm
906 movq dmask_mm, dmask2_mm 906 movq dmask_mm, dmask2_mm
@@ -1056,7 +1056,7 @@ inflate_fast:
1056 jmp .L_while_test_mmx 1056 jmp .L_while_test_mmx
1057 1057
1058.align 16,0x90 1058.align 16,0x90
1059.L_test_for_second_level_length_mmx: 1059.L_test_for_second_level_length_mmx:
1060 testb $64, %al 1060 testb $64, %al
1061 jnz .L_test_for_end_of_block /* if ((op & 64) != 0) */ 1061 jnz .L_test_for_end_of_block /* if ((op & 64) != 0) */
1062 1062