From 7baa3d795c87c11550f1686488c968320428cbf9 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 22 Jun 2012 15:53:45 +0200 Subject: Switch to zlib 1.2.7 --- zlib/contrib/masmx64/gvmat64.asm | 52 ++++++++++++++++++++++++++++++++----- zlib/contrib/masmx64/gvmat64.obj | Bin 4119 -> 0 bytes zlib/contrib/masmx64/inffas8664.c | 6 ++--- zlib/contrib/masmx64/inffasx64.asm | 12 ++++++--- zlib/contrib/masmx64/inffasx64.obj | Bin 5913 -> 0 bytes zlib/contrib/masmx64/readme.txt | 7 +++-- 6 files changed, 62 insertions(+), 15 deletions(-) delete mode 100644 zlib/contrib/masmx64/gvmat64.obj delete mode 100644 zlib/contrib/masmx64/inffasx64.obj (limited to 'zlib/contrib/masmx64') 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: diff --git a/zlib/contrib/masmx64/gvmat64.obj b/zlib/contrib/masmx64/gvmat64.obj deleted file mode 100644 index a49ca029c..000000000 Binary files a/zlib/contrib/masmx64/gvmat64.obj and /dev/null differ diff --git a/zlib/contrib/masmx64/inffas8664.c b/zlib/contrib/masmx64/inffas8664.c index 3af764de9..e8af06fa0 100644 --- a/zlib/contrib/masmx64/inffas8664.c +++ b/zlib/contrib/masmx64/inffas8664.c @@ -111,11 +111,11 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ type_ar ar; void inffas8664fnc(struct inffast_ar * par); - + #if (defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 )) || (defined(_MSC_VER) && defined(_M_AMD64)) #define PAD_AVAIL_IN 6 -#define PAD_AVAIL_OUT 258 +#define PAD_AVAIL_OUT 258 #else #define PAD_AVAIL_IN 5 #define PAD_AVAIL_OUT 257 @@ -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/zlib/contrib/masmx64/inffasx64.asm b/zlib/contrib/masmx64/inffasx64.asm index b5d93a272..60a8d89b7 100644 --- a/zlib/contrib/masmx64/inffasx64.asm +++ b/zlib/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 @@ -379,7 +383,7 @@ L_break_loop_with_status: mov r14,[rsp-40] mov r15,[rsp-48] mov rbx,[rsp-56] - + ret 0 ; : ; : "m" (ar) diff --git a/zlib/contrib/masmx64/inffasx64.obj b/zlib/contrib/masmx64/inffasx64.obj deleted file mode 100644 index 8df5d8261..000000000 Binary files a/zlib/contrib/masmx64/inffasx64.obj and /dev/null differ diff --git a/zlib/contrib/masmx64/readme.txt b/zlib/contrib/masmx64/readme.txt index ee03115c5..2da673341 100644 --- a/zlib/contrib/masmx64/readme.txt +++ b/zlib/contrib/masmx64/readme.txt @@ -12,7 +12,10 @@ inffasx64.asm and inffas8664.c were written by Chris Anderson, by optimizing Use instructions ---------------- -Copy these files into the zlib source directory. +Assemble the .asm files using MASM and put the object files into the zlib source +directory. You can also get object files here: + + http://www.winimage.com/zLibDll/zlib124_masm_obj.zip define ASMV and ASMINF in your project. Include inffas8664.c in your source tree, and inffasx64.obj and gvmat64.obj as object to link. @@ -24,5 +27,5 @@ run bld_64.bat with Microsoft Macro Assembler (x64) for AMD64 (ml64.exe) ml64.exe is given with Visual Studio 2005, Windows 2003 server DDK -You can get Windows 2003 server DDK with ml64 and cl for AMD64 from +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) -- cgit v1.2.3