summaryrefslogtreecommitdiff
path: root/contrib/masmx64
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:32:36 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:32:36 -0700
commit67cc20d0041a32bee12bd9eb20ae218f91b73f77 (patch)
treed7e1b94bd15c30efd57cf9036f5fe89306b6bba0 /contrib/masmx64
parent7751bd4c715ea8478113e34b49b5a794a4642e8e (diff)
downloadzlib-67cc20d0041a32bee12bd9eb20ae218f91b73f77.tar.gz
zlib 1.2.4-pre1v1.2.4-pre1
Diffstat (limited to 'contrib/masmx64')
-rw-r--r--contrib/masmx64/gvmat64.asm49
-rw-r--r--contrib/masmx64/inffas8664.c2
-rw-r--r--contrib/masmx64/inffasx64.asm10
3 files changed, 52 insertions, 9 deletions
diff --git a/contrib/masmx64/gvmat64.asm b/contrib/masmx64/gvmat64.asm
index d2790cc..9879c28 100644
--- a/contrib/masmx64/gvmat64.asm
+++ b/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
diff --git a/contrib/masmx64/inffas8664.c b/contrib/masmx64/inffas8664.c
index 2263d77..e8af06f 100644
--- a/contrib/masmx64/inffas8664.c
+++ b/contrib/masmx64/inffas8664.c
@@ -130,7 +130,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
ar.beg = ar.out - (start - strm->avail_out);
ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT);
ar.wsize = state->wsize;
- ar.write = state->write;
+ ar.write = state->wnext;
ar.window = state->window;
ar.hold = state->hold;
ar.bits = state->bits;
diff --git a/contrib/masmx64/inffasx64.asm b/contrib/masmx64/inffasx64.asm
index c2ba03f..60a8d89 100644
--- a/contrib/masmx64/inffasx64.asm
+++ b/contrib/masmx64/inffasx64.asm
@@ -9,12 +9,16 @@
; ml64.exe /Flinffasx64 /c /Zi inffasx64.asm
; with Microsoft Macro Assembler (x64) for AMD64
;
-; ml64.exe is given with Visual Studio 2005, Windows 2003 server DDK
+
+; This file compile with Microsoft Macro Assembler (x64) for AMD64
+;
+; ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK
;
-; (you can get Windows 2003 server DDK with ml64 and cl.exe 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)
;
+
.code
inffas8664fnc PROC