[Zlib-devel] new assembly code for modified structure in zLib 1.2.2.1
Gilles Vollant
info at winimage.com
Mon Nov 1 09:07:37 EST 2004
structure inflate_state and deflate_state were modified in zLib 1.2.2.1
I've updated files from contrib\masmx86
you can get
http://gvollant.free.fr/newasmzl1221.zip
before releasing next zlib, we must probably modify (or at least check)
other assembly code
*** zlib-1.2.2\gvmat32.asm Wed May 24 11:07:11 2000
--- zlib-1.2.2.1\gvmat32.asm Mon Nov 01 14:59:20 2004
***************
*** 47,67 ****
! ; all the +4 offsets are due to the addition of pending_buf_size (in zlib
; in the deflate_state structure since the asm code was first written
! ; (if you compile with zlib 1.0.4 or older, remove the +4).
; Note : these value are good with a 8 bytes boundary pack structure
! dep_chain_length equ 70h+4
! dep_window equ 2ch+4
! dep_strstart equ 60h+4
! dep_prev_length equ 6ch+4
! dep_nice_match equ 84h+4
! dep_w_size equ 20h+4
! dep_prev equ 34h+4
! dep_w_mask equ 28h+4
! dep_good_match equ 80h+4
! dep_match_start equ 64h+4
! dep_lookahead equ 68h+4
_TEXT segment
--- 47,71 ----
! ; all the +addstr offsets are due to the addition of pending_buf_size in
zlib 1.04
! ; and adding gzhead and gzindex in zlib 1.2.2.1
; in the deflate_state structure since the asm code was first written
! ; (if you compile with zlib 1.0.4 or older, set addstr to 0).
! ; (if you compiler with zlib between 1.04 and 1.2.1, set addstr to 4)
; Note : these value are good with a 8 bytes boundary pack structure
!
! addstr equ 4+8
! dep_chain_length equ 70h+addstr
! dep_window equ 2ch+addstr
! dep_strstart equ 60h+addstr
! dep_prev_length equ 6ch+addstr
! dep_nice_match equ 84h+addstr
! dep_w_size equ 20h+addstr
! dep_prev equ 34h+addstr
! dep_w_mask equ 28h+addstr
! dep_good_match equ 80h+addstr
! dep_match_start equ 64h+addstr
! dep_lookahead equ 68h+addstr
_TEXT segment
***************
*** 597,615 ****
;;; program to crash horribly, without so much as a warning at
;;; compile time. Sigh.)
! dsWSize equ 36
! dsWMask equ 44
! dsWindow equ 48
! dsPrev equ 56
! dsMatchLen equ 88
! dsPrevMatch equ 92
! dsStrStart equ 100
! dsMatchStart equ 104
! dsLookahead equ 108
! dsPrevLen equ 112
! dsMaxChainLen equ 116
! dsGoodMatch equ 132
! dsNiceMatch equ 136
;;; match.asm -- Pentium-Pro-optimized version of longest_match()
--- 601,619 ----
;;; program to crash horribly, without so much as a warning at
;;; compile time. Sigh.)
! dsWSize equ 36+addstr-4
! dsWMask equ 44+addstr-4
! dsWindow equ 48+addstr-4
! dsPrev equ 56+addstr-4
! dsMatchLen equ 88+addstr-4
! dsPrevMatch equ 92+addstr-4
! dsStrStart equ 100+addstr-4
! dsMatchStart equ 104+addstr-4
! dsLookahead equ 108+addstr-4
! dsPrevLen equ 112+addstr-4
! dsMaxChainLen equ 116+addstr-4
! dsGoodMatch equ 132+addstr-4
! dsNiceMatch equ 136+addstr-4
;;; match.asm -- Pentium-Pro-optimized version of longest_match()
*** zlib-1.2.2\inffas32.asm Mon Aug 25 18:54:37 2003
--- zlib-1.2.2.1\inffas32.asm Mon Nov 01 14:48:27 2004
***************
*** 84,100 ****
dd 4294967295
mode_state equ 0 ;/* state->mode */
! wsize_state equ 32 ;/* state->wsize */
! write_state equ (36+4) ;/* state->write */
! window_state equ (40+4) ;/* state->window */
! hold_state equ (44+4) ;/* state->hold */
! bits_state equ (48+4) ;/* state->bits */
! lencode_state equ (64+4) ;/* state->lencode */
! distcode_state equ (68+4) ;/* state->distcode */
! lenbits_state equ (72+4) ;/* state->lenbits */
! distbits_state equ (76+4) ;/* state->distbits */
;;SECTION .text
--- 84,103 ----
dd 4294967295
+ ; head was added in zlib 1.2.2.1, so we add addstr
+ ; set addstr to 0 with zlib 1.2.1 of below
+ addstr equ 4
mode_state equ 0 ;/* state->mode */
! wsize_state equ 32+addstr ;/* state->wsize */
! write_state equ (36+4+addstr) ;/* state->write */
! window_state equ (40+4+addstr) ;/* state->window */
! hold_state equ (44+4+addstr) ;/* state->hold */
! bits_state equ (48+4+addstr) ;/* state->bits */
! lencode_state equ (64+4+addstr) ;/* state->lencode */
! distcode_state equ (68+4+addstr) ;/* state->distcode */
! lenbits_state equ (72+4+addstr) ;/* state->lenbits */
! distbits_state equ (76+4+addstr) ;/* state->distbits */
;;SECTION .text
More information about the Zlib-devel
mailing list