diff options
author | marha <marha@users.sourceforge.net> | 2012-06-22 15:53:45 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-06-22 15:54:13 +0200 |
commit | 7baa3d795c87c11550f1686488c968320428cbf9 (patch) | |
tree | 4c932d59c53a0d358916a7c66af5103b8bf22813 /zlib/contrib/masmx64/gvmat64.asm | |
parent | e1a407256a5c1571d8f4871fd981a51cfbd46e37 (diff) | |
download | vcxsrv-7baa3d795c87c11550f1686488c968320428cbf9.tar.gz vcxsrv-7baa3d795c87c11550f1686488c968320428cbf9.tar.bz2 vcxsrv-7baa3d795c87c11550f1686488c968320428cbf9.zip |
Switch to zlib 1.2.7
Diffstat (limited to 'zlib/contrib/masmx64/gvmat64.asm')
-rw-r--r-- | zlib/contrib/masmx64/gvmat64.asm | 52 |
1 files changed, 46 insertions, 6 deletions
diff --git a/zlib/contrib/masmx64/gvmat64.asm b/zlib/contrib/masmx64/gvmat64.asm index 790d65554..9879c28b9 100644 --- a/zlib/contrib/masmx64/gvmat64.asm +++ b/zlib/contrib/masmx64/gvmat64.asm @@ -2,8 +2,10 @@ ; deflate_state *s,
; IPos cur_match); /* current match */
-; gvmat64.asm -- Asm portion of the optimized longest_match for 32 bits x86
-; Copyright (C) 1995-2005 Jean-loup Gailly, Brian Raiter and Gilles Vollant.
+; gvmat64.asm -- Asm portion of the optimized longest_match for 32 bits x86_64
+; (AMD64 on Athlon 64, Opteron, Phenom
+; and Intel EM64T on Pentium 4 with EM64T, Pentium D, Core 2 Duo, Core I5/I7)
+; Copyright (C) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant.
;
; File written by Gilles Vollant, by converting to assembly the longest_match
; from Jean-loup Gailly in deflate.c of zLib and infoZip zip.
@@ -11,6 +13,24 @@ ; and by taking inspiration on asm686 with masm, optimised assembly code
; from Brian Raiter, written 1998
;
+; This software is provided 'as-is', without any express or implied
+; warranty. In no event will the authors be held liable for any damages
+; arising from the use of this software.
+;
+; Permission is granted to anyone to use this software for any purpose,
+; including commercial applications, and to alter it and redistribute it
+; freely, subject to the following restrictions:
+;
+; 1. The origin of this software must not be misrepresented; you must not
+; claim that you wrote the original software. If you use this software
+; in a product, an acknowledgment in the product documentation would be
+; appreciated but is not required.
+; 2. Altered source versions must be plainly marked as such, and must not be
+; misrepresented as being the original software
+; 3. This notice may not be removed or altered from any source distribution.
+;
+;
+;
; http://www.zlib.net
; http://www.winimage.com/zLibDll
; http://www.muppetlabs.com/~breadbox/software/assembly.html
@@ -26,10 +46,10 @@ ;
; This file compile with Microsoft Macro Assembler (x64) for AMD64
;
-; ml64.exe is given with Visual Studio 2005 and Windows 2003 server DDK
+; ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK
;
-; (you can get Windows 2003 server DDK with ml64 and cl for AMD64 from
-; http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price)
+; (you can get Windows WDK with ml64 for AMD64 from
+; http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price)
;
@@ -71,6 +91,25 @@ save_r13 equ rsp + 64 - LocalVarsSize ;save_r15 equ rsp + 80 - LocalVarsSize
+; summary of register usage
+; scanend ebx
+; scanendw bx
+; chainlenwmask edx
+; curmatch rsi
+; curmatchd esi
+; windowbestlen r8
+; scanalign r9
+; scanalignd r9d
+; window r10
+; bestlen r11
+; bestlend r11d
+; scanstart r12d
+; scanstartw r12w
+; scan r13
+; nicematch r14d
+; limit r15
+; limitd r15d
+; prev rcx
; 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
@@ -406,7 +445,8 @@ LoopCmps: add rdx,8+8+8
- jmp short LoopCmps
+ jnz short LoopCmps
+ jmp short LenMaximum
LeaveLoopCmps16: add rdx,8
LeaveLoopCmps8: add rdx,8
LeaveLoopCmps:
|