亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? match.asm

?? linux 2.6kernel下面png庫
?? ASM
字號:

; match.asm -- Pentium-Pro optimized version of longest_match()
;
; Updated for zlib 1.1.3 and converted to MASM 6.1x
; Copyright (C) 2000 Dan Higdon <hdan@kinesoft.com>
;                    and Chuck Walbourn <chuckw@kinesoft.com>
; Corrections by Cosmin Truta <cosmint@cs.ubbcluj.ro>
;
; This is free software; you can redistribute it and/or modify it
; under the terms of the GNU General Public License.

; Based on match.S
; Written for zlib 1.1.2
; Copyright (C) 1998 Brian Raiter <breadbox@muppetlabs.com>
;
; Modified by Gilles Vollant (2005) for add gzhead and gzindex

	.686P
	.MODEL	FLAT

;===========================================================================
; EQUATES
;===========================================================================

MAX_MATCH	EQU 258
MIN_MATCH	EQU 3
MIN_LOOKAHEAD	EQU (MAX_MATCH + MIN_MATCH + 1)
MAX_MATCH_8	EQU ((MAX_MATCH + 7) AND (NOT 7))

;===========================================================================
; STRUCTURES
;===========================================================================

; This STRUCT assumes a 4-byte alignment

DEFLATE_STATE	STRUCT
ds_strm			dd ?
ds_status		dd ?
ds_pending_buf		dd ?
ds_pending_buf_size	dd ?
ds_pending_out		dd ?
ds_pending		dd ?
ds_wrap			dd ?
; gzhead and gzindex are added in zlib 1.2.2.2 (see deflate.h)
ds_gzhead               dd ?
ds_gzindex              dd ?
ds_data_type		db ?
ds_method		db ?
			db ?	; padding
			db ?	; padding
ds_last_flush		dd ?
ds_w_size		dd ?	; used
ds_w_bits		dd ?
ds_w_mask		dd ?	; used
ds_window		dd ?	; used
ds_window_size		dd ?
ds_prev			dd ?	; used
ds_head			dd ?
ds_ins_h		dd ?
ds_hash_size		dd ?
ds_hash_bits		dd ?
ds_hash_mask		dd ?
ds_hash_shift		dd ?
ds_block_start		dd ?
ds_match_length		dd ?	; used
ds_prev_match		dd ?	; used
ds_match_available	dd ?
ds_strstart		dd ?	; used
ds_match_start		dd ?	; used
ds_lookahead		dd ?	; used
ds_prev_length		dd ?	; used
ds_max_chain_length	dd ?	; used
ds_max_laxy_match	dd ?
ds_level		dd ?
ds_strategy		dd ?
ds_good_match		dd ?	; used
ds_nice_match		dd ?	; used

; Don't need anymore of the struct for match
DEFLATE_STATE	ENDS

;===========================================================================
; CODE
;===========================================================================
_TEXT	SEGMENT

;---------------------------------------------------------------------------
; match_init
;---------------------------------------------------------------------------
	ALIGN	4
PUBLIC	_match_init
_match_init	PROC
	; no initialization needed
	ret
_match_init	ENDP

;---------------------------------------------------------------------------
; uInt longest_match(deflate_state *deflatestate, IPos curmatch)
;---------------------------------------------------------------------------
	ALIGN	4

PUBLIC	_longest_match
_longest_match	PROC

; Since this code uses EBP for a scratch register, the stack frame must
; be manually constructed and referenced relative to the ESP register.

; Stack image
; Variables
chainlenwmask	=  0	; high word: current chain len
			; low word: s->wmask
window		=  4	; local copy of s->window
windowbestlen	=  8	; s->window + bestlen
scanend		= 12	; last two bytes of string
scanstart	= 16	; first two bytes of string
scanalign	= 20	; dword-misalignment of string
nicematch	= 24	; a good enough match size
bestlen		= 28	; size of best match so far
scan		= 32	; ptr to string wanting match
varsize		= 36	; number of bytes (also offset to last saved register)

; Saved Registers (actually pushed into place)
ebx_save	= 36
edi_save	= 40
esi_save	= 44
ebp_save	= 48

; Parameters
retaddr		= 52
deflatestate	= 56
curmatch	= 60

; Save registers that the compiler may be using
	push	ebp
	push	edi
	push	esi
	push	ebx

; Allocate local variable space
	sub	esp,varsize

; Retrieve the function arguments. ecx will hold cur_match
; throughout the entire function. edx will hold the pointer to the
; deflate_state structure during the function's setup (before
; entering the main loop).

	mov	edx, [esp+deflatestate]
ASSUME	edx:PTR DEFLATE_STATE

	mov	ecx, [esp+curmatch]

; uInt wmask = s->w_mask;
; unsigned chain_length = s->max_chain_length;
; if (s->prev_length >= s->good_match) {
;     chain_length >>= 2;
; }

	mov	eax, [edx].ds_prev_length
	mov	ebx, [edx].ds_good_match
	cmp	eax, ebx
	mov	eax, [edx].ds_w_mask
	mov	ebx, [edx].ds_max_chain_length
	jl	SHORT LastMatchGood
	shr	ebx, 2
LastMatchGood:

; chainlen is decremented once beforehand so that the function can
; use the sign flag instead of the zero flag for the exit test.
; It is then shifted into the high word, to make room for the wmask
; value, which it will always accompany.

	dec	ebx
	shl	ebx, 16
	or	ebx, eax
	mov	[esp+chainlenwmask], ebx

; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;

	mov	eax, [edx].ds_nice_match
	mov	ebx, [edx].ds_lookahead
	cmp	ebx, eax
	jl	SHORT LookaheadLess
	mov	ebx, eax
LookaheadLess:
	mov	[esp+nicematch], ebx

;/* register Bytef *scan = s->window + s->strstart;                     */

	mov	esi, [edx].ds_window
	mov	[esp+window], esi
	mov	ebp, [edx].ds_strstart
	lea	edi, [esi+ebp]
	mov	[esp+scan],edi

;/* Determine how many bytes the scan ptr is off from being             */
;/* dword-aligned.                                                      */

	mov	eax, edi
	neg	eax
	and	eax, 3
	mov	[esp+scanalign], eax

;/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ?                      */
;/*     s->strstart - (IPos)MAX_DIST(s) : NIL;                          */

	mov	eax, [edx].ds_w_size
	sub	eax, MIN_LOOKAHEAD
	sub	ebp, eax
	jg	SHORT LimitPositive
	xor	ebp, ebp
LimitPositive:

;/* int best_len = s->prev_length;                                      */

	mov	eax, [edx].ds_prev_length
	mov	[esp+bestlen], eax

;/* Store the sum of s->window + best_len in %esi locally, and in %esi. */

	add	esi, eax
	mov	[esp+windowbestlen], esi

;/* register ush scan_start = *(ushf*)scan;                             */
;/* register ush scan_end   = *(ushf*)(scan+best_len-1);                */
;/* Posf *prev = s->prev;                                               */

	movzx	ebx, WORD PTR[edi]
	mov	[esp+scanstart], ebx
	movzx	ebx, WORD PTR[eax+edi-1]
	mov	[esp+scanend], ebx
	mov	edi, [edx].ds_prev

;/* Jump into the main loop.                                            */

	mov	edx, [esp+chainlenwmask]
	jmp	SHORT LoopEntry

;/* do {
; *     match = s->window + cur_match;
; *     if (*(ushf*)(match+best_len-1) != scan_end ||
; *         *(ushf*)match != scan_start) continue;
; *     [...]
; * } while ((cur_match = prev[cur_match & wmask]) > limit
; *          && --chain_length != 0);
; *
; * Here is the inner loop of the function. The function will spend the
; * majority of its time in this loop, and majority of that time will
; * be spent in the first ten instructions.
; *
; * Within this loop:
; * %ebx = scanend
; * %ecx = curmatch
; * %edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
; * %esi = windowbestlen - i.e., (window + bestlen)
; * %edi = prev
; * %ebp = limit
; */

	ALIGN	4
LookupLoop:
	and	ecx, edx
	movzx	ecx, WORD PTR[edi+ecx*2]
	cmp	ecx, ebp
	jbe	LeaveNow
	sub	edx, 000010000H
	js	LeaveNow

LoopEntry:
	movzx	eax, WORD PTR[esi+ecx-1]
	cmp	eax, ebx
	jnz	SHORT LookupLoop

	mov	eax, [esp+window]
	movzx	eax, WORD PTR[eax+ecx]
	cmp	eax, [esp+scanstart]
	jnz	SHORT LookupLoop

;/* Store the current value of chainlen.                                */

	mov	[esp+chainlenwmask], edx

;/* Point %edi to the string under scrutiny, and %esi to the string we  */
;/* are hoping to match it up with. In actuality, %esi and %edi are     */
;/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is     */
;/* initialized to -(MAX_MATCH_8 - scanalign).                          */

	mov	esi, [esp+window]
	mov	edi, [esp+scan]
	add	esi, ecx
	mov	eax, [esp+scanalign]
	mov	edx, -MAX_MATCH_8
	lea	edi, [edi+eax+MAX_MATCH_8]
	lea	esi, [esi+eax+MAX_MATCH_8]

;/* Test the strings for equality, 8 bytes at a time. At the end,
; * adjust %edx so that it is offset to the exact byte that mismatched.
; *
; * We already know at this point that the first three bytes of the
; * strings match each other, and they can be safely passed over before
; * starting the compare loop. So what this code does is skip over 0-3
; * bytes, as much as necessary in order to dword-align the %edi
; * pointer. (%esi will still be misaligned three times out of four.)
; *
; * It should be confessed that this loop usually does not represent
; * much of the total running time. Replacing it with a more
; * straightforward "rep cmpsb" would not drastically degrade
; * performance.
; */

LoopCmps:
	mov	eax, DWORD PTR[esi+edx]
	xor	eax, DWORD PTR[edi+edx]
	jnz	SHORT LeaveLoopCmps

	mov	eax, DWORD PTR[esi+edx+4]
	xor	eax, DWORD PTR[edi+edx+4]
	jnz	SHORT LeaveLoopCmps4

	add	edx, 8
	jnz	SHORT LoopCmps
	jmp	LenMaximum
	ALIGN	4

LeaveLoopCmps4:
	add	edx, 4

LeaveLoopCmps:
	test	eax, 00000FFFFH
	jnz	SHORT LenLower

	add	edx, 2
	shr	eax, 16

LenLower:
	sub	al, 1
	adc	edx, 0

;/* Calculate the length of the match. If it is longer than MAX_MATCH,  */
;/* then automatically accept it as the best possible match and leave.  */

	lea	eax, [edi+edx]
	mov	edi, [esp+scan]
	sub	eax, edi
	cmp	eax, MAX_MATCH
	jge	SHORT LenMaximum

;/* If the length of the match is not longer than the best match we     */
;/* have so far, then forget it and return to the lookup loop.          */

	mov	edx, [esp+deflatestate]
	mov	ebx, [esp+bestlen]
	cmp	eax, ebx
	jg	SHORT LongerMatch
	mov	esi, [esp+windowbestlen]
	mov	edi, [edx].ds_prev
	mov	ebx, [esp+scanend]
	mov	edx, [esp+chainlenwmask]
	jmp	LookupLoop
	ALIGN	4

;/*         s->match_start = cur_match;                                 */
;/*         best_len = len;                                             */
;/*         if (len >= nice_match) break;                               */
;/*         scan_end = *(ushf*)(scan+best_len-1);                       */

LongerMatch:
	mov	ebx, [esp+nicematch]
	mov	[esp+bestlen], eax
	mov	[edx].ds_match_start, ecx
	cmp	eax, ebx
	jge	SHORT LeaveNow
	mov	esi, [esp+window]
	add	esi, eax
	mov	[esp+windowbestlen], esi
	movzx	ebx, WORD PTR[edi+eax-1]
	mov	edi, [edx].ds_prev
	mov	[esp+scanend], ebx
	mov	edx, [esp+chainlenwmask]
	jmp	LookupLoop
	ALIGN	4

;/* Accept the current string, with the maximum possible length.        */

LenMaximum:
	mov	edx, [esp+deflatestate]
	mov	DWORD PTR[esp+bestlen], MAX_MATCH
	mov	[edx].ds_match_start, ecx

;/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len;          */
;/* return s->lookahead;                                                */

LeaveNow:
	mov	edx, [esp+deflatestate]
	mov	ebx, [esp+bestlen]
	mov	eax, [edx].ds_lookahead
	cmp	ebx, eax
	jg	SHORT LookaheadRet
	mov	eax, ebx
LookaheadRet:

; Restore the stack and return from whence we came.

	add	esp, varsize
	pop	ebx
	pop	esi
	pop	edi
	pop	ebp
	ret

_longest_match	ENDP

_TEXT	ENDS
END

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
狠狠色丁香久久婷婷综合_中| 欧美日韩视频在线一区二区 | 一区2区3区在线看| 美女脱光内衣内裤视频久久网站 | 国产成人av福利| 欧美图区在线视频| 国产精品乱人伦中文| 日韩电影免费一区| 色欧美日韩亚洲| 国产精品美女久久久久av爽李琼| 欧美a级一区二区| 欧美亚洲综合另类| 亚洲精品乱码久久久久久久久| 国产成人免费在线| 久久综合国产精品| 日本不卡中文字幕| 欧美日韩在线播放一区| 亚洲另类春色国产| 成人禁用看黄a在线| 国产亚洲婷婷免费| 韩国精品在线观看| 欧美成人精品二区三区99精品| 亚洲国产中文字幕在线视频综合| 91麻豆免费看片| 亚洲欧美一区二区三区久本道91 | 精品一区二区三区免费| 欧美日韩国产一二三| 亚洲精品国久久99热| 成人福利视频在线看| 久久久美女毛片| 国产69精品久久99不卡| 欧美极品另类videosde| 国产成人午夜高潮毛片| 国产亚洲精品资源在线26u| 国产成人鲁色资源国产91色综| 久久综合色综合88| 国产精品一区二区在线观看不卡| 久久欧美一区二区| 高清在线观看日韩| 中文字幕一区av| 99精品久久99久久久久| 亚洲在线成人精品| 欧美精品成人一区二区三区四区| 日韩va亚洲va欧美va久久| 亚洲精品一线二线三线无人区| 狠狠v欧美v日韩v亚洲ⅴ| 久久久久久亚洲综合| 成人国产在线观看| 亚洲狠狠丁香婷婷综合久久久| 欧美日韩另类国产亚洲欧美一级| 美国一区二区三区在线播放| 久久精品一二三| 色天天综合色天天久久| 蜜桃精品在线观看| 国产精品福利一区| 欧美久久婷婷综合色| 美女一区二区在线观看| 国产亚洲一区二区三区四区| av爱爱亚洲一区| 性欧美大战久久久久久久久| 精品久久久久久综合日本欧美| 国产a精品视频| 亚洲h精品动漫在线观看| 欧美日韩国产综合一区二区三区| 久久国产精品色| 亚洲女人的天堂| 欧美一级搡bbbb搡bbbb| 99这里只有精品| 奇米色一区二区| 亚洲天堂2016| 日韩一区二区在线观看视频| 99久久综合99久久综合网站| 免播放器亚洲一区| 亚洲三级小视频| 日韩欧美国产麻豆| 欧美曰成人黄网| 国产福利视频一区二区三区| 亚洲午夜久久久| 国产精品久99| 精品蜜桃在线看| 欧美性猛片aaaaaaa做受| 国产成+人+日韩+欧美+亚洲| 热久久久久久久| 亚洲一区二区三区四区的| 国产亚洲一区二区三区四区 | 亚洲日本欧美天堂| 日韩欧美电影在线| 欧美视频一区二区| 色综合久久88色综合天天| 国产精品乡下勾搭老头1| 午夜精品免费在线| 亚洲裸体在线观看| 欧美国产1区2区| 久久久久国产免费免费| 欧美一级淫片007| 欧美日本乱大交xxxxx| 91麻豆swag| 91在线码无精品| 99在线视频精品| 成人精品一区二区三区四区 | 2021国产精品久久精品| 88在线观看91蜜桃国自产| 91麻豆免费看| 色系网站成人免费| 91麻豆精东视频| 一本久久a久久免费精品不卡| 不卡视频免费播放| 成人av网站在线| 成人午夜激情在线| 国产成人免费视频一区| 国产盗摄一区二区三区| 国产成人自拍在线| 成人综合在线视频| www.日韩在线| 92精品国产成人观看免费| 99精品视频在线播放观看| 99re66热这里只有精品3直播| 盗摄精品av一区二区三区| 国产成人在线影院| 成人av在线一区二区三区| 成人精品在线视频观看| 一本一道久久a久久精品| 欧洲中文字幕精品| 91精品在线观看入口| 日韩一级免费观看| 久久久综合九色合综国产精品| 国产区在线观看成人精品| 国产精品污网站| 亚洲免费观看高清| 婷婷亚洲久悠悠色悠在线播放| 日本少妇一区二区| 国产呦萝稀缺另类资源| 成人伦理片在线| 欧美午夜精品一区| 日韩精品一区二区三区中文不卡 | 樱桃视频在线观看一区| 亚洲成人综合在线| 国产自产2019最新不卡| 成人午夜短视频| 色av一区二区| 欧美一区二区三区啪啪| 国产婷婷色一区二区三区| 亚洲精品写真福利| 麻豆精品视频在线观看免费| 懂色av一区二区夜夜嗨| 色婷婷亚洲婷婷| 精品乱人伦一区二区三区| 1024亚洲合集| 久久99精品久久久久久动态图| 粉嫩aⅴ一区二区三区四区五区| 欧美亚洲动漫精品| 久久精品视频一区二区三区| 亚洲精品久久久久久国产精华液| 美女精品自拍一二三四| 99国产一区二区三精品乱码| 日韩一二三四区| 亚洲欧美电影一区二区| 国产一区二区福利| 欧美私人免费视频| 国产精品毛片高清在线完整版| 午夜精品影院在线观看| 99久久婷婷国产综合精品电影 | 极品少妇一区二区三区精品视频 | 成人av第一页| 欧美一区二区精品久久911| 亚洲欧美在线视频观看| 国产一区二区中文字幕| 在线观看一区日韩| 日本一二三四高清不卡| 蜜桃视频一区二区三区| 在线观看视频一区二区 | 欧美成人三级电影在线| 亚洲午夜精品在线| 99re在线精品| 国产精品国产自产拍高清av| 精品一区二区免费在线观看| 欧美日韩中文字幕一区二区| 亚洲精品视频在线观看网站| 国产成人精品亚洲日本在线桃色| 精品视频色一区| 亚洲精品第1页| 99精品视频在线观看| 欧美国产1区2区| 国产精品资源网| 久久精品视频在线看| 狠狠色狠狠色综合日日91app| 91精品麻豆日日躁夜夜躁| 亚洲午夜免费视频| 欧美视频一区在线观看| 一区二区国产视频| 在线观看一区二区精品视频| 亚洲欧美日韩电影| 91一区在线观看| 中文字幕视频一区| 成人av中文字幕| 中文字幕永久在线不卡| 成人h动漫精品一区二区| 国产精品第五页| 在线一区二区三区做爰视频网站| 中文字幕一区二区三区四区不卡|