fix bug in 'trees.asm'

git-svn-id: svn://kolibrios.org@6855 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA 2017-02-05 10:24:40 +00:00
parent 5f948ae4c6
commit b08e3b7796

View File

@ -672,7 +672,7 @@ align 4
movzx eax,word[f] movzx eax,word[f]
mov esi,sizeof.ct_data mov esi,sizeof.ct_data
imul esi,ecx imul esi,ecx
add esi,[tree] ;;;must be [stree] but don't work add esi,[stree]
movzx esi,word[esi+Len] movzx esi,word[esi+Len]
add esi,[xbits] add esi,[xbits]
imul eax,esi imul eax,esi
@ -1133,10 +1133,11 @@ align 4
add eax,edi add eax,edi
inc word[eax+deflate_state.bl_tree+Freq] inc word[eax+deflate_state.bl_tree+Freq]
.end4: .end4:
mov dword[count],0
mov eax,[curlen] mov eax,[curlen]
mov [prevlen],eax mov [prevlen],eax
cmp dword[nextlen],0 xor eax,eax
mov dword[count],eax
cmp dword[nextlen],eax
jne .end5 ;if (..==0) jne .end5 ;if (..==0)
mov dword[max_count],138 mov dword[max_count],138
mov dword[min_count],3 mov dword[min_count],3
@ -1166,7 +1167,7 @@ endp
; deflate_state* s ; deflate_state* s
; ct_data *tree ;the tree to be scanned ; ct_data *tree ;the tree to be scanned
; int max_code ;and its largest code of non zero frequency ; int max_code ;and its largest code of non zero frequency
align 4 align 16
proc send_tree uses eax ebx ecx edi, s:dword, tree:dword, max_code:dword proc send_tree uses eax ebx ecx edi, s:dword, tree:dword, max_code:dword
locals locals
n dd ? ;int ;iterates over all tree elements n dd ? ;int ;iterates over all tree elements
@ -1263,11 +1264,11 @@ align 4
sub ebx,11 sub ebx,11
stdcall send_bits, edi, ebx, 7 stdcall send_bits, edi, ebx, 7
.end4: .end4:
mov dword[curlen],0
mov eax,[curlen] mov eax,[curlen]
mov [prevlen],eax mov [prevlen],eax
mov [nextlen],eax xor eax,eax
cmp eax,0 mov dword[count],eax
cmp [nextlen],eax
jne .end5 ;if (..==0) jne .end5 ;if (..==0)
mov dword[max_count],138 mov dword[max_count],138
mov dword[min_count],3 mov dword[min_count],3