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-1.2.4-pre1.tar.gz
zlib-1.2.4-pre1.tar.bz2
zlib-1.2.4-pre1.zip
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 @@
2; deflate_state *s, 2; deflate_state *s,
3; IPos cur_match); /* current match */ 3; IPos cur_match); /* current match */
4 4
5; gvmat64.asm -- Asm portion of the optimized longest_match for 32 bits x86 5; gvmat64.asm -- Asm portion of the optimized longest_match for 32 bits x86_64
6; Copyright (C) 1995-2005 Jean-loup Gailly, Brian Raiter and Gilles Vollant. 6; (AMD64 on Athlon 64, Opteron, Phenom
7; and Intel EM64T on Pentium 4 with EM64T, Pentium D, Core 2 Duo, Core I5/I7)
8; Copyright (C) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant.
7; 9;
8; File written by Gilles Vollant, by converting to assembly the longest_match 10; File written by Gilles Vollant, by converting to assembly the longest_match
9; from Jean-loup Gailly in deflate.c of zLib and infoZip zip. 11; from Jean-loup Gailly in deflate.c of zLib and infoZip zip.
@@ -11,6 +13,24 @@
11; and by taking inspiration on asm686 with masm, optimised assembly code 13; and by taking inspiration on asm686 with masm, optimised assembly code
12; from Brian Raiter, written 1998 14; from Brian Raiter, written 1998
13; 15;
16; This software is provided 'as-is', without any express or implied
17; warranty. In no event will the authors be held liable for any damages
18; arising from the use of this software.
19;
20; Permission is granted to anyone to use this software for any purpose,
21; including commercial applications, and to alter it and redistribute it
22; freely, subject to the following restrictions:
23;
24; 1. The origin of this software must not be misrepresented; you must not
25; claim that you wrote the original software. If you use this software
26; in a product, an acknowledgment in the product documentation would be
27; appreciated but is not required.
28; 2. Altered source versions must be plainly marked as such, and must not be
29; misrepresented as being the original software
30; 3. This notice may not be removed or altered from any source distribution.
31;
32;
33;
14; http://www.zlib.net 34; http://www.zlib.net
15; http://www.winimage.com/zLibDll 35; http://www.winimage.com/zLibDll
16; http://www.muppetlabs.com/~breadbox/software/assembly.html 36; http://www.muppetlabs.com/~breadbox/software/assembly.html
@@ -26,10 +46,10 @@
26; 46;
27; This file compile with Microsoft Macro Assembler (x64) for AMD64 47; This file compile with Microsoft Macro Assembler (x64) for AMD64
28; 48;
29; ml64.exe is given with Visual Studio 2005 and Windows 2003 server DDK 49; ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK
30; 50;
31; (you can get Windows 2003 server DDK with ml64 and cl for AMD64 from 51; (you can get Windows WDK with ml64 for AMD64 from
32; http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price) 52; http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price)
33; 53;
34 54
35 55
@@ -71,6 +91,25 @@ save_r13 equ rsp + 64 - LocalVarsSize
71;save_r15 equ rsp + 80 - LocalVarsSize 91;save_r15 equ rsp + 80 - LocalVarsSize
72 92
73 93
94; summary of register usage
95; scanend ebx
96; scanendw bx
97; chainlenwmask edx
98; curmatch rsi
99; curmatchd esi
100; windowbestlen r8
101; scanalign r9
102; scanalignd r9d
103; window r10
104; bestlen r11
105; bestlend r11d
106; scanstart r12d
107; scanstartw r12w
108; scan r13
109; nicematch r14d
110; limit r15
111; limitd r15d
112; prev rcx
74 113
75; all the +4 offsets are due to the addition of pending_buf_size (in zlib 114; all the +4 offsets are due to the addition of pending_buf_size (in zlib
76; in the deflate_state structure since the asm code was first written 115; 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 */
130 ar.beg = ar.out - (start - strm->avail_out); 130 ar.beg = ar.out - (start - strm->avail_out);
131 ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT); 131 ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT);
132 ar.wsize = state->wsize; 132 ar.wsize = state->wsize;
133 ar.write = state->write; 133 ar.write = state->wnext;
134 ar.window = state->window; 134 ar.window = state->window;
135 ar.hold = state->hold; 135 ar.hold = state->hold;
136 ar.bits = state->bits; 136 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 @@
9; ml64.exe /Flinffasx64 /c /Zi inffasx64.asm 9; ml64.exe /Flinffasx64 /c /Zi inffasx64.asm
10; with Microsoft Macro Assembler (x64) for AMD64 10; with Microsoft Macro Assembler (x64) for AMD64
11; 11;
12; ml64.exe is given with Visual Studio 2005, Windows 2003 server DDK 12
13; This file compile with Microsoft Macro Assembler (x64) for AMD64
14;
15; ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK
13; 16;
14; (you can get Windows 2003 server DDK with ml64 and cl.exe for AMD64 from 17; (you can get Windows WDK with ml64 for AMD64 from
15; http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price) 18; http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price)
16; 19;
17 20
21
18.code 22.code
19inffas8664fnc PROC 23inffas8664fnc PROC
20 24