]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Updated the FMUSolution to produce x64 dll's (refs #4892).
authormiettinen <miettinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 20 May 2014 09:21:21 +0000 (09:21 +0000)
committermiettinen <miettinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 20 May 2014 09:21:21 +0000 (09:21 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@29519 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.fmu/FMUSolution/FMUSimulator/FMUSimulator.vcxproj
org.simantics.fmu/FMUSolution/FMUSimulator/FMUSimulator.vcxproj.filters
org.simantics.fmu/FMUSolution/FMUSimulator/include/expat.lib [new file with mode: 0644]
org.simantics.fmu/FMUSolution/FMUSolution.sln
org.simantics.fmu/FMUSolution/x64/Release/libexpat-1.dll [new file with mode: 0644]
org.simantics.fmu/FMUSolution/zlib-1.2.6/contrib/masmx64/gvmat64.lst [new file with mode: 0644]
org.simantics.fmu/FMUSolution/zlib-1.2.6/contrib/masmx64/gvmat64.obj [new file with mode: 0644]
org.simantics.fmu/FMUSolution/zlib-1.2.6/contrib/masmx64/inffasx64.lst [new file with mode: 0644]
org.simantics.fmu/FMUSolution/zlib-1.2.6/contrib/masmx64/inffasx64.obj [new file with mode: 0644]
org.simantics.fmu/FMUSolution/zlib-1.2.6/contrib/vstudio/vc10/miniunz.vcxproj

index a1c71e6ff85db922d2c235985695e091cd8ff055..774e3690f8ffe859fc20fb3895e1c6d31bf5d410 100644 (file)
@@ -5,10 +5,18 @@
       <Configuration>Debug</Configuration>\r
       <Platform>Win32</Platform>\r
     </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Debug|x64">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
     <ProjectConfiguration Include="Release|Win32">\r
       <Configuration>Release</Configuration>\r
       <Platform>Win32</Platform>\r
     </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|x64">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
   </ItemGroup>\r
   <PropertyGroup Label="Globals">\r
     <ProjectGuid>{9838038D-09A3-43A5-AB97-B5B5C763DF43}</ProjectGuid>\r
     <UseDebugLibraries>true</UseDebugLibraries>\r
     <CharacterSet>NotSet</CharacterSet>\r
   </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
+    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <CharacterSet>NotSet</CharacterSet>\r
+  </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
     <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <UseDebugLibraries>false</UseDebugLibraries>\r
     <WholeProgramOptimization>false</WholeProgramOptimization>\r
     <CharacterSet>NotSet</CharacterSet>\r
   </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
+    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+    <UseDebugLibraries>false</UseDebugLibraries>\r
+    <WholeProgramOptimization>false</WholeProgramOptimization>\r
+    <CharacterSet>NotSet</CharacterSet>\r
+  </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
   </ImportGroup>\r
   <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
   </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
   <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
   </ImportGroup>\r
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+  </ImportGroup>\r
   <PropertyGroup Label="UserMacros" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <LinkIncremental>false</LinkIncremental>\r
     <LibraryPath>$(OutDir);$(ProjectDir)include;$(LibraryPath)</LibraryPath>\r
     <SourcePath>$(SourcePath)</SourcePath>\r
   </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <LinkIncremental>false</LinkIncremental>\r
+    <IncludePath>$(SolutionDir)zlib-1.2.6\contrib\minizip;$(OutDir);$(ProjectDir)include;$(IncludePath)</IncludePath>\r
+    <LibraryPath>$(OutDir);$(ProjectDir)include;$(LibraryPath)</LibraryPath>\r
+    <SourcePath>$(SourcePath)</SourcePath>\r
+  </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <LinkIncremental>false</LinkIncremental>\r
     <IncludePath>$(SolutionDir)zlib-1.2.6\contrib\minizip;$(OutDir);$(ProjectDir)include;$(IncludePath)</IncludePath>\r
     <LibraryPath>$(OutDir);$(ProjectDir)include;$(LibraryPath)</LibraryPath>\r
     <SourcePath>$(SourcePath)</SourcePath>\r
   </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <LinkIncremental>false</LinkIncremental>\r
+    <IncludePath>$(SolutionDir)zlib-1.2.6\contrib\minizip;$(OutDir);$(ProjectDir)include;$(IncludePath)</IncludePath>\r
+    <LibraryPath>$(OutDir);$(ProjectDir)include;$(LibraryPath)</LibraryPath>\r
+    <SourcePath>$(SourcePath)</SourcePath>\r
+  </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <ClCompile>\r
       <PrecompiledHeader>NotUsing</PrecompiledHeader>\r
       <AdditionalDependencies>$(OutDir)zlibwapi.lib;$(OutDir)miniunz.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
     </Link>\r
   </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+    <ClCompile>\r
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;FMUSIMULATOR_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Windows</SubSystem>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+      <AdditionalDependencies>$(OutDir)zlibwapi.lib;$(OutDir)miniunz.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <ClCompile>\r
       <WarningLevel>Level3</WarningLevel>\r
       <AdditionalDependencies>$(OutDir)zlibwapi.lib;$(OutDir)miniunz.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
     </Link>\r
   </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <FunctionLevelLinking>\r
+      </FunctionLevelLinking>\r
+      <IntrinsicFunctions>false</IntrinsicFunctions>\r
+      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FMUSIMULATOR_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
+      <AdditionalIncludeDirectories>\r
+      </AdditionalIncludeDirectories>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Windows</SubSystem>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+      <OptimizeReferences>true</OptimizeReferences>\r
+      <AdditionalDependencies>$(OutDir)zlibwapi.lib;$(OutDir)miniunz.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+    </Link>\r
+    <Manifest>\r
+      <InputResourceManifests>\r
+      </InputResourceManifests>\r
+    </Manifest>\r
+  </ItemDefinitionGroup>\r
   <ItemGroup>\r
     <ClCompile Include="src\fmu_control.cpp" />\r
     <ClCompile Include="src\sim_support.c" />\r
     <ClInclude Include="include\xml_parser.h" />\r
   </ItemGroup>\r
   <ItemGroup>\r
+    <Library Include="..\x64\Release\expat.lib" />\r
     <Library Include="include\libexpatMT.lib" />\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
index a819ab7d59852b1909f8aeb4074992c7442ea001..33d44c103ad2a49bad5cef5e1a93fb11936d4bf0 100644 (file)
@@ -52,5 +52,8 @@
     <Library Include="include\libexpatMT.lib">\r
       <Filter>Resource Files</Filter>\r
     </Library>\r
+    <Library Include="..\x64\Release\expat.lib">\r
+      <Filter>Resource Files</Filter>\r
+    </Library>\r
   </ItemGroup>\r
 </Project>
\ No newline at end of file
diff --git a/org.simantics.fmu/FMUSolution/FMUSimulator/include/expat.lib b/org.simantics.fmu/FMUSolution/FMUSimulator/include/expat.lib
new file mode 100644 (file)
index 0000000..08ee750
Binary files /dev/null and b/org.simantics.fmu/FMUSolution/FMUSimulator/include/expat.lib differ
index f3f21f80a94219b3ea8605559477b793b16c6484..2360dc119c9b8f14b1508ddbc08d82f4e95a8424 100644 (file)
@@ -1,6 +1,6 @@
 \r
 Microsoft Visual Studio Solution File, Format Version 11.00\r
-# Visual C++ Express 2010\r
+# Visual Studio 2010\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FMUSimulator", "FMUSimulator\FMUSimulator.vcxproj", "{9838038D-09A3-43A5-AB97-B5B5C763DF43}"\r
        ProjectSection(ProjectDependencies) = postProject\r
                {C52F9E7B-498A-42BE-8DB4-85A15694382A} = {C52F9E7B-498A-42BE-8DB4-85A15694382A}\r
@@ -17,28 +17,49 @@ EndProject
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
                Debug|Win32 = Debug|Win32\r
+               Debug|x64 = Debug|x64\r
                Release|Win32 = Release|Win32\r
+               Release|x64 = Release|x64\r
                ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32\r
+               ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64\r
        EndGlobalSection\r
        GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
                {9838038D-09A3-43A5-AB97-B5B5C763DF43}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {9838038D-09A3-43A5-AB97-B5B5C763DF43}.Debug|Win32.Build.0 = Debug|Win32\r
+               {9838038D-09A3-43A5-AB97-B5B5C763DF43}.Debug|x64.ActiveCfg = Debug|x64\r
+               {9838038D-09A3-43A5-AB97-B5B5C763DF43}.Debug|x64.Build.0 = Debug|x64\r
                {9838038D-09A3-43A5-AB97-B5B5C763DF43}.Release|Win32.ActiveCfg = Release|Win32\r
                {9838038D-09A3-43A5-AB97-B5B5C763DF43}.Release|Win32.Build.0 = Release|Win32\r
+               {9838038D-09A3-43A5-AB97-B5B5C763DF43}.Release|x64.ActiveCfg = Release|x64\r
+               {9838038D-09A3-43A5-AB97-B5B5C763DF43}.Release|x64.Build.0 = Release|x64\r
                {9838038D-09A3-43A5-AB97-B5B5C763DF43}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32\r
                {9838038D-09A3-43A5-AB97-B5B5C763DF43}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32\r
+               {9838038D-09A3-43A5-AB97-B5B5C763DF43}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64\r
+               {9838038D-09A3-43A5-AB97-B5B5C763DF43}.ReleaseWithoutAsm|x64.Build.0 = Release|x64\r
                {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32\r
+               {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64\r
+               {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64\r
                {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32\r
                {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32\r
+               {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64\r
+               {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64\r
                {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32\r
                {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32\r
+               {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64\r
+               {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.Build.0 = Release|x64\r
                {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32\r
+               {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64\r
+               {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64\r
                {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = ReleaseWithoutAsm|Win32\r
                {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = ReleaseWithoutAsm|Win32\r
+               {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64\r
+               {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64\r
                {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32\r
                {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32\r
+               {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64\r
+               {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
diff --git a/org.simantics.fmu/FMUSolution/x64/Release/libexpat-1.dll b/org.simantics.fmu/FMUSolution/x64/Release/libexpat-1.dll
new file mode 100644 (file)
index 0000000..0f8b01b
Binary files /dev/null and b/org.simantics.fmu/FMUSolution/x64/Release/libexpat-1.dll differ
diff --git a/org.simantics.fmu/FMUSolution/zlib-1.2.6/contrib/masmx64/gvmat64.lst b/org.simantics.fmu/FMUSolution/zlib-1.2.6/contrib/masmx64/gvmat64.lst
new file mode 100644 (file)
index 0000000..aa5e476
--- /dev/null
@@ -0,0 +1,666 @@
+Microsoft (R) Macro Assembler (x64) Version 10.00.40219.01  05/20/14 09:52:26\r
+gvmat64.asm                                                 Page 1 - 1\r
+\r
+\r
+                               ;uInt longest_match_x64(\r
+                               ;    deflate_state *s,\r
+                               ;    IPos cur_match);                             /* current match */\r
+\r
+                               ; gvmat64.asm -- Asm portion of the optimized longest_match for 32 bits x86_64\r
+                               ;  (AMD64 on Athlon 64, Opteron, Phenom\r
+                               ;     and Intel EM64T on Pentium 4 with EM64T, Pentium D, Core 2 Duo, Core I5/I7)\r
+                               ; Copyright (C) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant.\r
+                               ;\r
+                               ; File written by Gilles Vollant, by converting to assembly the longest_match\r
+                               ;  from Jean-loup Gailly in deflate.c of zLib and infoZip zip.\r
+                               ;\r
+                               ;  and by taking inspiration on asm686 with masm, optimised assembly code\r
+                               ;        from Brian Raiter, written 1998\r
+                               ;\r
+                               ;  This software is provided 'as-is', without any express or implied\r
+                               ;  warranty.  In no event will the authors be held liable for any damages\r
+                               ;  arising from the use of this software.\r
+                               ;\r
+                               ;  Permission is granted to anyone to use this software for any purpose,\r
+                               ;  including commercial applications, and to alter it and redistribute it\r
+                               ;  freely, subject to the following restrictions:\r
+                               ;\r
+                               ;  1. The origin of this software must not be misrepresented; you must not\r
+                               ;     claim that you wrote the original software. If you use this software\r
+                               ;     in a product, an acknowledgment in the product documentation would be\r
+                               ;     appreciated but is not required.\r
+                               ;  2. Altered source versions must be plainly marked as such, and must not be\r
+                               ;     misrepresented as being the original software\r
+                               ;  3. This notice may not be removed or altered from any source distribution.\r
+                               ;\r
+                               ;\r
+                               ;\r
+                               ;         http://www.zlib.net\r
+                               ;         http://www.winimage.com/zLibDll\r
+                               ;         http://www.muppetlabs.com/~breadbox/software/assembly.html\r
+                               ;\r
+                               ; to compile this file for infozip Zip, I use option:\r
+                               ;   ml64.exe /Flgvmat64 /c /Zi /DINFOZIP gvmat64.asm\r
+                               ;\r
+                               ; to compile this file for zLib, I use option:\r
+                               ;   ml64.exe /Flgvmat64 /c /Zi gvmat64.asm\r
+                               ; Be carrefull to adapt zlib1222add below to your version of zLib\r
+                               ;   (if you use a version of zLib before 1.0.4 or after 1.2.2.2, change\r
+                               ;    value of zlib1222add later)\r
+                               ;\r
+                               ; This file compile with Microsoft Macro Assembler (x64) for AMD64\r
+                               ;\r
+                               ;   ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK\r
+                               ;\r
+                               ;   (you can get Windows WDK with ml64 for AMD64 from\r
+                               ;      http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price)\r
+                               ;\r
+\r
+\r
+                               ;uInt longest_match(s, cur_match)\r
+                               ;    deflate_state *s;\r
+                               ;    IPos cur_match;                             /* current match */\r
+ 00000000                      .code\r
+ 00000000                      longest_match PROC\r
+\r
+\r
+                               ;LocalVarsSize   equ 88\r
+ = 00000048                     LocalVarsSize   equ 72\r
+\r
+                               ; register used : rax,rbx,rcx,rdx,rsi,rdi,r8,r9,r10,r11,r12\r
+                               ; free register :  r14,r15\r
+                               ; register can be saved : rsp\r
+\r
+ = rsp + 8 - LocalVarsSize      chainlenwmask   equ  rsp + 8 - LocalVarsSize    ; high word: current chain len\r
+                                                                                ; low word: s->wmask\r
+                               ;window          equ  rsp + xx - LocalVarsSize   ; local copy of s->window ; stored in r10\r
+                               ;windowbestlen   equ  rsp + xx - LocalVarsSize   ; s->window + bestlen , use r10+r11\r
+                               ;scanstart       equ  rsp + xx - LocalVarsSize   ; first two bytes of string ; stored in r12w\r
+                               ;scanend         equ  rsp + xx - LocalVarsSize   ; last two bytes of string use ebx\r
+                               ;scanalign       equ  rsp + xx - LocalVarsSize   ; dword-misalignment of string r13\r
+                               ;bestlen         equ  rsp + xx - LocalVarsSize   ; size of best match so far -> r11d\r
+                               ;scan            equ  rsp + xx - LocalVarsSize   ; ptr to string wanting match -> r9\r
+                               IFDEF INFOZIP\r
+                               ELSE\r
+ = (rsp + 16 - LocalVarsSiz     nicematch       equ  (rsp + 16 - LocalVarsSize) ; a good enough match size\r
+   e)\r
+                               ENDIF\r
+\r
+ = rsp + 24 - LocalVarsSize    save_rdi        equ  rsp + 24 - LocalVarsSize\r
+ = rsp + 32 - LocalVarsSize    save_rsi        equ  rsp + 32 - LocalVarsSize\r
+ = rsp + 40 - LocalVarsSize    save_rbx        equ  rsp + 40 - LocalVarsSize\r
+ = rsp + 48 - LocalVarsSize    save_rbp        equ  rsp + 48 - LocalVarsSize\r
+ = rsp + 56 - LocalVarsSize    save_r12        equ  rsp + 56 - LocalVarsSize\r
+ = rsp + 64 - LocalVarsSize    save_r13        equ  rsp + 64 - LocalVarsSize\r
+                               ;save_r14        equ  rsp + 72 - LocalVarsSize\r
+                               ;save_r15        equ  rsp + 80 - LocalVarsSize\r
+\r
+\r
+                               ; summary of register usage\r
+                               ; scanend     ebx\r
+                               ; scanendw    bx\r
+                               ; chainlenwmask   edx\r
+                               ; curmatch    rsi\r
+                               ; curmatchd   esi\r
+                               ; windowbestlen   r8\r
+                               ; scanalign   r9\r
+                               ; scanalignd  r9d\r
+                               ; window      r10\r
+                               ; bestlen     r11\r
+                               ; bestlend    r11d\r
+                               ; scanstart   r12d\r
+                               ; scanstartw  r12w\r
+                               ; scan        r13\r
+                               ; nicematch   r14d\r
+                               ; limit       r15\r
+                               ; limitd      r15d\r
+                               ; prev        rcx\r
+\r
+                               ;  all the +4 offsets are due to the addition of pending_buf_size (in zlib\r
+                               ;  in the deflate_state structure since the asm code was first written\r
+                               ;  (if you compile with zlib 1.0.4 or older, remove the +4).\r
+                               ;  Note : these value are good with a 8 bytes boundary pack structure\r
+\r
+\r
+ = 00000102                        MAX_MATCH           equ     258\r
+ = 00000003                        MIN_MATCH           equ     3\r
+ = 00000106                        MIN_LOOKAHEAD       equ     (MAX_MATCH+MIN_MATCH+1)\r
+\r
+\r
+                               ;;; Offsets for fields in the deflate_state structure. These numbers\r
+                               ;;; are calculated from the definition of deflate_state, with the\r
+                               ;;; assumption that the compiler will dword-align the fields. (Thus,\r
+                               ;;; changing the definition of deflate_state could easily cause this\r
+                               ;;; program to crash horribly, without so much as a warning at\r
+                               ;;; compile time. Sigh.)\r
+\r
+                               ;  all the +zlib1222add offsets are due to the addition of fields\r
+                               ;  in zlib in the deflate_state structure since the asm code was first written\r
+                               ;  (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").\r
+                               ;  (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").\r
+                               ;  if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").\r
+\r
+\r
+                               IFDEF INFOZIP\r
+                               ELSE\r
+\r
+                                 IFNDEF zlib1222add\r
+ = 00000008                        zlib1222add equ 8\r
+                                 ENDIF\r
+ = 00000044                    dsWSize         equ 56+zlib1222add+(zlib1222add/2)\r
+ = 0000004C                    dsWMask         equ 64+zlib1222add+(zlib1222add/2)\r
+ = 00000050                    dsWindow        equ 72+zlib1222add\r
+ = 00000060                    dsPrev          equ 88+zlib1222add\r
+ = 00000088                    dsMatchLen      equ 128+zlib1222add\r
+ = 0000008C                    dsPrevMatch     equ 132+zlib1222add\r
+ = 00000094                    dsStrStart      equ 140+zlib1222add\r
+ = 00000098                    dsMatchStart    equ 144+zlib1222add\r
+ = 0000009C                    dsLookahead     equ 148+zlib1222add\r
+ = 000000A0                    dsPrevLen       equ 152+zlib1222add\r
+ = 000000A4                    dsMaxChainLen   equ 156+zlib1222add\r
+ = 000000B4                    dsGoodMatch     equ 172+zlib1222add\r
+ = 000000B8                    dsNiceMatch     equ 176+zlib1222add\r
+\r
+ = [ rcx + dsWSize]            window_size     equ [ rcx + dsWSize]\r
+ = [ rcx + dsWMask]            WMask           equ [ rcx + dsWMask]\r
+ = [ rcx + dsWindow]           window_ad       equ [ rcx + dsWindow]\r
+ = [ rcx + dsPrev]             prev_ad         equ [ rcx + dsPrev]\r
+ = [ rcx + dsStrStart]         strstart        equ [ rcx + dsStrStart]\r
+ = [ rcx + dsMatchStart]       match_start     equ [ rcx + dsMatchStart]\r
+ = [ rcx + dsLookahead]                Lookahead       equ [ rcx + dsLookahead] ; 0ffffffffh on infozip\r
+ = [ rcx + dsPrevLen]          prev_length     equ [ rcx + dsPrevLen]\r
+ = [ rcx + dsMaxChainLen]      max_chain_length equ [ rcx + dsMaxChainLen]\r
+ = [ rcx + dsGoodMatch]                good_match      equ [ rcx + dsGoodMatch]\r
+ = [ rcx + dsNiceMatch]                nice_match      equ [ rcx + dsNiceMatch]\r
+                               ENDIF\r
+\r
+                               ; parameter 1 in r8(deflate state s), param 2 in rdx (cur match)\r
+\r
+                               ; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and\r
+                               ; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp\r
+                               ;\r
+                               ; All registers must be preserved across the call, except for\r
+                               ;   rax, rcx, rdx, r8, r9, r10, and r11, which are scratch.\r
+\r
+\r
+\r
+                               ;;; Save registers that the compiler may be using, and adjust esp to\r
+                               ;;; make room for our stack frame.\r
+\r
+\r
+                               ;;; Retrieve the function arguments. r8d will hold cur_match\r
+                               ;;; throughout the entire function. edx will hold the pointer to the\r
+                               ;;; deflate_state structure during the function's setup (before\r
+                               ;;; entering the main loop.\r
+\r
+                               ; parameter 1 in rcx (deflate_state* s), param 2 in edx -> r8 (cur match)\r
+\r
+                               ; this clear high 32 bits of r8, which can be garbage in both r8 and rdx\r
+\r
+ 00000000  48/ 89 7C 24                        mov [save_rdi],rdi\r
+          D0\r
+ 00000005  48/ 89 74 24                        mov [save_rsi],rsi\r
+          D8\r
+ 0000000A  48/ 89 5C 24                        mov [save_rbx],rbx\r
+          E0\r
+ 0000000F  48/ 89 6C 24                        mov [save_rbp],rbp\r
+          E8\r
+                               IFDEF INFOZIP\r
+                               ELSE\r
+ 00000014  44/ 8B C2                   mov r8d,edx\r
+                               ENDIF\r
+ 00000017  4C/ 89 64 24                        mov [save_r12],r12\r
+          F0\r
+ 0000001C  4C/ 89 6C 24                        mov [save_r13],r13\r
+          F8\r
+                               ;        mov [save_r14],r14\r
+                               ;        mov [save_r15],r15\r
+\r
+\r
+                               ;;; uInt wmask = s->w_mask;\r
+                               ;;; unsigned chain_length = s->max_chain_length;\r
+                               ;;; if (s->prev_length >= s->good_match) {\r
+                               ;;;     chain_length >>= 2;\r
+                               ;;; }\r
+\r
+ 00000021  8B B9 000000A0              mov edi, prev_length\r
+ 00000027  8B B1 000000B4              mov esi, good_match\r
+ 0000002D  8B 41 4C                    mov eax, WMask\r
+ 00000030  8B 99 000000A4              mov ebx, max_chain_length\r
+ 00000036  3B FE                       cmp edi, esi\r
+ 00000038  7C 03                       jl  LastMatchGood\r
+ 0000003A  C1 EB 02                    shr ebx, 2\r
+ 0000003D                      LastMatchGood:\r
+\r
+                               ;;; chainlen is decremented once beforehand so that the function can\r
+                               ;;; use the sign flag instead of the zero flag for the exit test.\r
+                               ;;; It is then shifted into the high word, to make room for the wmask\r
+                               ;;; value, which it will always accompany.\r
+\r
+ 0000003D  FF CB                       dec ebx\r
+ 0000003F  C1 E3 10                    shl ebx, 16\r
+ 00000042  0B D8                       or  ebx, eax\r
+\r
+                               ;;; on zlib only\r
+                               ;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;\r
+\r
+                               IFDEF INFOZIP\r
+                               ELSE\r
+ 00000044  8B 81 000000B8              mov eax, nice_match\r
+ 0000004A  89 5C 24 C0                 mov [chainlenwmask], ebx\r
+ 0000004E  44/ 8B 91                   mov r10d, Lookahead\r
+          0000009C\r
+ 00000055  44/ 3B D0                   cmp r10d, eax\r
+ 00000058  44/ 0F 4D D0                        cmovnl r10d, eax\r
+ 0000005C  44/ 89 54 24                        mov [nicematch],r10d\r
+          C8\r
+                               ENDIF\r
+\r
+                               ;;; register Bytef *scan = s->window + s->strstart;\r
+ 00000061  4C/ 8B 51 50                        mov r10, window_ad\r
+ 00000065  8B A9 00000094              mov ebp, strstart\r
+ 0000006B  4E/ 8D 6C 15                        lea r13, [r10 + rbp]\r
+          00\r
+\r
+                               ;;; Determine how many bytes the scan ptr is off from being\r
+                               ;;; dword-aligned.\r
+\r
+ 00000070  4D/ 8B CD                    mov r9,r13\r
+ 00000073  49/ F7 DD                    neg r13\r
+ 00000076  49/ 83 E5 03                         and r13,3\r
+\r
+                               ;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?\r
+                               ;;;     s->strstart - (IPos)MAX_DIST(s) : NIL;\r
+                               IFDEF INFOZIP\r
+                               ELSE\r
+ 0000007A  8B 41 44                    mov eax, window_size\r
+ 0000007D  2D 00000106                 sub eax, MIN_LOOKAHEAD\r
+                               ENDIF\r
+ 00000082  33 FF                       xor edi,edi\r
+ 00000084  2B E8                       sub ebp, eax\r
+\r
+ 00000086  44/ 8B 99                   mov r11d, prev_length\r
+          000000A0\r
+\r
+ 0000008D  0F 4E EF                    cmovng ebp,edi\r
+\r
+                               ;;; int best_len = s->prev_length;\r
+\r
+\r
+                               ;;; Store the sum of s->window + best_len in esi locally, and in esi.\r
+\r
+ 00000090  4B/ 8D 34 13                       lea  rsi,[r10+r11]\r
+\r
+                               ;;; register ush scan_start = *(ushf*)scan;\r
+                               ;;; register ush scan_end   = *(ushf*)(scan+best_len-1);\r
+                               ;;; Posf *prev = s->prev;\r
+\r
+ 00000094  45/ 0F B7 21                        movzx r12d,word ptr [r9]\r
+ 00000098  43/ 0F B7 5C 0B             movzx ebx, word ptr [r9 + r11 - 1]\r
+          FF\r
+\r
+ 0000009E  48/ 8B 79 60                        mov rdi, prev_ad\r
+\r
+                               ;;; Jump into the main loop.\r
+\r
+ 000000A2  8B 54 24 C0                 mov edx, [chainlenwmask]\r
+\r
+ 000000A6  66| 41/ 3B 5C 30            cmp bx,word ptr [rsi + r8 - 1]\r
+          FF\r
+ 000000AC  0F 84 0000009A              jz  LookupLoopIsZero\r
+\r
+ 000000B2                      LookupLoop1:\r
+ 000000B2  44/ 23 C2                   and r8d, edx\r
+\r
+ 000000B5  46/ 0F B7 04 47             movzx   r8d, word ptr [rdi + r8*2]\r
+ 000000BA  44/ 3B C5                   cmp r8d, ebp\r
+ 000000BD  0F 86 00000170              jbe LeaveNow\r
+ 000000C3  81 EA 00010000              sub edx, 00010000h\r
+ 000000C9  0F 88 00000164              js  LeaveNow\r
+\r
+ 000000CF                      LoopEntry1:\r
+ 000000CF  66| 41/ 3B 5C 30            cmp bx,word ptr [rsi + r8 - 1]\r
+          FF\r
+ 000000D5  74 75                       jz  LookupLoopIsZero\r
+\r
+ 000000D7                      LookupLoop2:\r
+ 000000D7  44/ 23 C2                   and r8d, edx\r
+\r
+ 000000DA  46/ 0F B7 04 47             movzx   r8d, word ptr [rdi + r8*2]\r
+ 000000DF  44/ 3B C5                   cmp r8d, ebp\r
+ 000000E2  0F 86 0000014B              jbe LeaveNow\r
+ 000000E8  81 EA 00010000              sub edx, 00010000h\r
+ 000000EE  0F 88 0000013F              js  LeaveNow\r
+\r
+ 000000F4                      LoopEntry2:\r
+ 000000F4  66| 41/ 3B 5C 30            cmp bx,word ptr [rsi + r8 - 1]\r
+          FF\r
+ 000000FA  74 50                       jz  LookupLoopIsZero\r
+\r
+ 000000FC                      LookupLoop4:\r
+ 000000FC  44/ 23 C2                   and r8d, edx\r
+\r
+ 000000FF  46/ 0F B7 04 47             movzx   r8d, word ptr [rdi + r8*2]\r
+ 00000104  44/ 3B C5                   cmp r8d, ebp\r
+ 00000107  0F 86 00000126              jbe LeaveNow\r
+ 0000010D  81 EA 00010000              sub edx, 00010000h\r
+ 00000113  0F 88 0000011A              js  LeaveNow\r
+\r
+ 00000119                      LoopEntry4:\r
+\r
+ 00000119  66| 41/ 3B 5C 30            cmp bx,word ptr [rsi + r8 - 1]\r
+          FF\r
+ 0000011F  75 91                       jnz LookupLoop1\r
+ 00000121  EB 29                       jmp LookupLoopIsZero\r
+\r
+\r
+                               ;;; do {\r
+                               ;;;     match = s->window + cur_match;\r
+                               ;;;     if (*(ushf*)(match+best_len-1) != scan_end ||\r
+                               ;;;         *(ushf*)match != scan_start) continue;\r
+                               ;;;     [...]\r
+                               ;;; } while ((cur_match = prev[cur_match & wmask]) > limit\r
+                               ;;;          && --chain_length != 0);\r
+                               ;;;\r
+                               ;;; Here is the inner loop of the function. The function will spend the\r
+                               ;;; majority of its time in this loop, and majority of that time will\r
+                               ;;; be spent in the first ten instructions.\r
+                               ;;;\r
+                               ;;; Within this loop:\r
+                               ;;; ebx = scanend\r
+                               ;;; r8d = curmatch\r
+                               ;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)\r
+                               ;;; esi = windowbestlen - i.e., (window + bestlen)\r
+                               ;;; edi = prev\r
+                               ;;; ebp = limit\r
+\r
+ 00000123                      LookupLoop:\r
+ 00000123  44/ 23 C2                   and r8d, edx\r
+\r
+ 00000126  46/ 0F B7 04 47             movzx   r8d, word ptr [rdi + r8*2]\r
+ 0000012B  44/ 3B C5                   cmp r8d, ebp\r
+ 0000012E  0F 86 000000FF              jbe LeaveNow\r
+ 00000134  81 EA 00010000              sub edx, 00010000h\r
+ 0000013A  0F 88 000000F3              js  LeaveNow\r
+\r
+ 00000140                      LoopEntry:\r
+\r
+ 00000140  66| 41/ 3B 5C 30            cmp bx,word ptr [rsi + r8 - 1]\r
+          FF\r
+ 00000146  0F 85 FFFFFF66              jnz LookupLoop1\r
+ 0000014C                      LookupLoopIsZero:\r
+ 0000014C  66| 47/ 3B 24 10            cmp     r12w, word ptr [r10 + r8]\r
+ 00000151  0F 85 FFFFFF5B              jnz LookupLoop1\r
+\r
+\r
+                               ;;; Store the current value of chainlen.\r
+ 00000157  89 54 24 C0                 mov [chainlenwmask], edx\r
+\r
+                               ;;; Point edi to the string under scrutiny, and esi to the string we\r
+                               ;;; are hoping to match it up with. In actuality, esi and edi are\r
+                               ;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is\r
+                               ;;; initialized to -(MAX_MATCH_8 - scanalign).\r
+\r
+ 0000015B  4B/ 8D 34 02                        lea rsi,[r8+r10]\r
+ 0000015F  48/ BA                      mov rdx, 0fffffffffffffef8h; -(MAX_MATCH_8)\r
+          FFFFFFFFFFFFFEF8\r
+ 00000169  49/ 8D B4 35                        lea rsi, [rsi + r13 + 0108h] ;MAX_MATCH_8]\r
+          00000108\r
+ 00000171  4B/ 8D BC 0D                        lea rdi, [r9 + r13 + 0108h] ;MAX_MATCH_8]\r
+          00000108\r
+\r
+ 00000179  0F 18 14 32                 prefetcht1 [rsi+rdx]\r
+ 0000017D  0F 18 14 3A                 prefetcht1 [rdi+rdx]\r
+\r
+\r
+                               ;;; Test the strings for equality, 8 bytes at a time. At the end,\r
+                               ;;; adjust rdx so that it is offset to the exact byte that mismatched.\r
+                               ;;;\r
+                               ;;; We already know at this point that the first three bytes of the\r
+                               ;;; strings match each other, and they can be safely passed over before\r
+                               ;;; starting the compare loop. So what this code does is skip over 0-3\r
+                               ;;; bytes, as much as necessary in order to dword-align the edi\r
+                               ;;; pointer. (rsi will still be misaligned three times out of four.)\r
+                               ;;;\r
+                               ;;; It should be confessed that this loop usually does not represent\r
+                               ;;; much of the total running time. Replacing it with a more\r
+                               ;;; straightforward "rep cmpsb" would not drastically degrade\r
+                               ;;; performance.\r
+\r
+\r
+ 00000181                      LoopCmps:\r
+ 00000181  48/ 8B 04 32                        mov rax, [rsi + rdx]\r
+ 00000185  48/ 33 04 3A                        xor rax, [rdi + rdx]\r
+ 00000189  75 28                       jnz LeaveLoopCmps\r
+\r
+ 0000018B  48/ 8B 44 32                        mov rax, [rsi + rdx + 8]\r
+          08\r
+ 00000190  48/ 33 44 3A                        xor rax, [rdi + rdx + 8]\r
+          08\r
+ 00000195  75 18                       jnz LeaveLoopCmps8\r
+\r
+\r
+ 00000197  48/ 8B 44 32                        mov rax, [rsi + rdx + 8+8]\r
+          10\r
+ 0000019C  48/ 33 44 3A                        xor rax, [rdi + rdx + 8+8]\r
+          10\r
+ 000001A1  75 08                       jnz LeaveLoopCmps16\r
+\r
+ 000001A3  48/ 83 C2 18                        add rdx,8+8+8\r
+\r
+ 000001A7  75 D8                       jnz short LoopCmps\r
+ 000001A9  EB 7B                       jmp short LenMaximum\r
+ 000001AB  48/ 83 C2 08                LeaveLoopCmps16: add rdx,8\r
+ 000001AF  48/ 83 C2 08                LeaveLoopCmps8: add rdx,8\r
+ 000001B3                      LeaveLoopCmps:\r
+\r
+ 000001B3  A9 0000FFFF                 test    eax, 0000FFFFh\r
+ 000001B8  75 1B                       jnz LenLower\r
+\r
+ 000001BA  A9 FFFFFFFF                 test eax,0ffffffffh\r
+\r
+ 000001BF  75 0D                       jnz LenLower32\r
+\r
+ 000001C1  48/ 83 C2 04                        add rdx,4\r
+ 000001C5  48/ C1 E8 20                        shr rax,32\r
+ 000001C9  66| 0B C0                   or ax,ax\r
+ 000001CC  75 07                       jnz LenLower\r
+\r
+ 000001CE                      LenLower32:\r
+ 000001CE  C1 E8 10                    shr eax,16\r
+ 000001D1  48/ 83 C2 02                        add rdx,2\r
+ 000001D5  2C 01               LenLower:   sub al, 1\r
+ 000001D7  48/ 83 D2 00                        adc rdx, 0\r
+                               ;;; Calculate the length of the match. If it is longer than MAX_MATCH,\r
+                               ;;; then automatically accept it as the best possible match and leave.\r
+\r
+ 000001DB  48/ 8D 04 3A                        lea rax, [rdi + rdx]\r
+ 000001DF  49/ 2B C1                   sub rax, r9\r
+ 000001E2  3D 00000102                 cmp eax, MAX_MATCH\r
+ 000001E7  7D 3D                       jge LenMaximum\r
+\r
+                               ;;; If the length of the match is not longer than the best match we\r
+                               ;;; have so far, then forget it and return to the lookup loop.\r
+                               ;///////////////////////////////////\r
+\r
+ 000001E9  41/ 3B C3                   cmp eax, r11d\r
+ 000001EC  7F 11                       jg  LongerMatch\r
+\r
+ 000001EE  4B/ 8D 34 13                        lea rsi,[r10+r11]\r
+\r
+ 000001F2  48/ 8B 79 60                        mov rdi, prev_ad\r
+ 000001F6  8B 54 24 C0                 mov edx, [chainlenwmask]\r
+ 000001FA  E9 FFFFFF24                 jmp LookupLoop\r
+\r
+                               ;;;         s->match_start = cur_match;\r
+                               ;;;         best_len = len;\r
+                               ;;;         if (len >= nice_match) break;\r
+                               ;;;         scan_end = *(ushf*)(scan+best_len-1);\r
+\r
+ 000001FF                      LongerMatch:\r
+ 000001FF  44/ 8B D8                   mov r11d, eax\r
+ 00000202  44/ 89 81                   mov match_start, r8d\r
+          00000098\r
+ 00000209  3B 44 24 C8                 cmp eax, [nicematch]\r
+ 0000020D  7D 24                       jge LeaveNow\r
+\r
+ 0000020F  4A/ 8D 34 10                        lea rsi,[r10+rax]\r
+\r
+ 00000213  42/ 0F B7 5C 08             movzx   ebx, word ptr [r9 + rax - 1]\r
+          FF\r
+ 00000219  48/ 8B 79 60                        mov rdi, prev_ad\r
+ 0000021D  8B 54 24 C0                 mov edx, [chainlenwmask]\r
+ 00000221  E9 FFFFFEFD                 jmp LookupLoop\r
+\r
+                               ;;; Accept the current string, with the maximum possible length.\r
+\r
+ 00000226                      LenMaximum:\r
+ 00000226  41/ BB                      mov r11d,MAX_MATCH\r
+          00000102\r
+ 0000022C  44/ 89 81                   mov match_start, r8d\r
+          00000098\r
+\r
+                               ;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len;\r
+                               ;;; return s->lookahead;\r
+\r
+ 00000233                      LeaveNow:\r
+                               IFDEF INFOZIP\r
+                               ELSE\r
+ 00000233  8B 81 0000009C              mov eax, Lookahead\r
+ 00000239  44/ 3B D8                   cmp r11d, eax\r
+ 0000023C  41/ 0F 4E C3                        cmovng eax, r11d\r
+                               ENDIF\r
+\r
+                               ;;; Restore the stack and return from whence we came.\r
+\r
+\r
+ 00000240  48/ 8B 74 24                        mov rsi,[save_rsi]\r
+          D8\r
+ 00000245  48/ 8B 7C 24                        mov rdi,[save_rdi]\r
+          D0\r
+ 0000024A  48/ 8B 5C 24                        mov rbx,[save_rbx]\r
+          E0\r
+ 0000024F  48/ 8B 6C 24                        mov rbp,[save_rbp]\r
+          E8\r
+ 00000254  4C/ 8B 64 24                        mov r12,[save_r12]\r
+          F0\r
+ 00000259  4C/ 8B 6C 24                        mov r13,[save_r13]\r
+          F8\r
+                               ;        mov r14,[save_r14]\r
+                               ;        mov r15,[save_r15]\r
+\r
+\r
+ 0000025E  C3                          ret 0\r
+                               ; please don't remove this string !\r
+                               ; Your can freely use gvmat64 in any free or commercial app\r
+                               ; but it is far better don't remove the string in the binary!\r
+ 0000025F  0D 0A 61 73 6D          db     0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998, converted to amd 64 by Gilles Vollant 2005",0dh,0ah,0\r
+          36 38 36 20 77\r
+          69 74 68 20 6D\r
+          61 73 6D 2C 20\r
+          6F 70 74 69 6D\r
+          69 73 65 64 20\r
+          61 73 73 65 6D\r
+          62 6C 79 20 63\r
+          6F 64 65 20 66\r
+          72 6F 6D 20 42\r
+          72 69 61 6E 20\r
+          52 61 69 74 65\r
+          72 2C 20 77 72\r
+          69 74 74 65 6E\r
+          20 31 39 39 38\r
+          2C 20 63 6F 6E\r
+          76 65 72 74 65\r
+          64 20 74 6F 20\r
+          61 6D 64 20 36\r
+          34 20 62 79 20\r
+          47 69 6C 6C 65\r
+          73 20 56 6F 6C\r
+          6C 61 6E 74 20\r
+          32 30 30 35 0D\r
+          0A 00\r
+ 000002D9                      longest_match   ENDP\r
+\r
+ 000002D9                      match_init PROC\r
+ 000002D9  C3                    ret 0\r
+ 000002DA                      match_init ENDP\r
+\r
+\r
+                               END\r
+\fMicrosoft (R) Macro Assembler (x64) Version 10.00.40219.01  05/20/14 09:52:26\r
+gvmat64.asm                                                 Symbols 2 - 1\r
+\r
+\r
+\r
+\r
+Procedures, parameters, and locals:\r
+\r
+                N a m e                 Type     Value    Attr\r
+\r
+longest_match  . . . . . . . . .       P        00000000 _TEXT Length= 000002D9 Public\r
+  LastMatchGood  . . . . . . . .       L        0000003D _TEXT \r
+  LookupLoop1  . . . . . . . . .       L        000000B2 _TEXT \r
+  LoopEntry1 . . . . . . . . . .       L        000000CF _TEXT \r
+  LookupLoop2  . . . . . . . . .       L        000000D7 _TEXT \r
+  LoopEntry2 . . . . . . . . . .       L        000000F4 _TEXT \r
+  LookupLoop4  . . . . . . . . .       L        000000FC _TEXT \r
+  LoopEntry4 . . . . . . . . . .       L        00000119 _TEXT \r
+  LookupLoop . . . . . . . . . .       L        00000123 _TEXT \r
+  LoopEntry  . . . . . . . . . .       L        00000140 _TEXT \r
+  LookupLoopIsZero . . . . . . .       L        0000014C _TEXT \r
+  LoopCmps . . . . . . . . . . .       L        00000181 _TEXT \r
+  LeaveLoopCmps16  . . . . . . .       L        000001AB _TEXT \r
+  LeaveLoopCmps8 . . . . . . . .       L        000001AF _TEXT \r
+  LeaveLoopCmps  . . . . . . . .       L        000001B3 _TEXT \r
+  LenLower32 . . . . . . . . . .       L        000001CE _TEXT \r
+  LenLower . . . . . . . . . . .       L        000001D5 _TEXT \r
+  LongerMatch  . . . . . . . . .       L        000001FF _TEXT \r
+  LenMaximum . . . . . . . . . .       L        00000226 _TEXT \r
+  LeaveNow . . . . . . . . . . .       L        00000233 _TEXT \r
+match_init . . . . . . . . . . .       P        000002D9 _TEXT Length= 00000001 Public\r
+\r
+\r
+Symbols:\r
+\r
+                N a m e                 Type     Value    Attr\r
+\r
+LocalVarsSize  . . . . . . . . .       Number   00000048h   \r
+Lookahead  . . . . . . . . . . .       Text     [ rcx + dsLookahead]\r
+MAX_MATCH  . . . . . . . . . . .       Number   00000102h   \r
+MIN_LOOKAHEAD  . . . . . . . . .       Number   00000106h   \r
+MIN_MATCH  . . . . . . . . . . .       Number   00000003h   \r
+WMask  . . . . . . . . . . . . .       Text     [ rcx + dsWMask]\r
+chainlenwmask  . . . . . . . . .       Text     rsp + 8 - LocalVarsSize\r
+dsGoodMatch  . . . . . . . . . .       Number   000000B4h   \r
+dsLookahead  . . . . . . . . . .       Number   0000009Ch   \r
+dsMatchLen . . . . . . . . . . .       Number   00000088h   \r
+dsMatchStart . . . . . . . . . .       Number   00000098h   \r
+dsMaxChainLen  . . . . . . . . .       Number   000000A4h   \r
+dsNiceMatch  . . . . . . . . . .       Number   000000B8h   \r
+dsPrevLen  . . . . . . . . . . .       Number   000000A0h   \r
+dsPrevMatch  . . . . . . . . . .       Number   0000008Ch   \r
+dsPrev . . . . . . . . . . . . .       Number   00000060h   \r
+dsStrStart . . . . . . . . . . .       Number   00000094h   \r
+dsWMask  . . . . . . . . . . . .       Number   0000004Ch   \r
+dsWSize  . . . . . . . . . . . .       Number   00000044h   \r
+dsWindow . . . . . . . . . . . .       Number   00000050h   \r
+good_match . . . . . . . . . . .       Text     [ rcx + dsGoodMatch]\r
+match_start  . . . . . . . . . .       Text     [ rcx + dsMatchStart]\r
+max_chain_length . . . . . . . .       Text     [ rcx + dsMaxChainLen]\r
+nice_match . . . . . . . . . . .       Text     [ rcx + dsNiceMatch]\r
+nicematch  . . . . . . . . . . .       Text     (rsp + 16 - LocalVarsSize)\r
+prev_ad  . . . . . . . . . . . .       Text     [ rcx + dsPrev]\r
+prev_length  . . . . . . . . . .       Text     [ rcx + dsPrevLen]\r
+save_r12 . . . . . . . . . . . .       Text     rsp + 56 - LocalVarsSize\r
+save_r13 . . . . . . . . . . . .       Text     rsp + 64 - LocalVarsSize\r
+save_rbp . . . . . . . . . . . .       Text     rsp + 48 - LocalVarsSize\r
+save_rbx . . . . . . . . . . . .       Text     rsp + 40 - LocalVarsSize\r
+save_rdi . . . . . . . . . . . .       Text     rsp + 24 - LocalVarsSize\r
+save_rsi . . . . . . . . . . . .       Text     rsp + 32 - LocalVarsSize\r
+strstart . . . . . . . . . . . .       Text     [ rcx + dsStrStart]\r
+window_ad  . . . . . . . . . . .       Text     [ rcx + dsWindow]\r
+window_size  . . . . . . . . . .       Text     [ rcx + dsWSize]\r
+zlib1222add  . . . . . . . . . .       Number   00000008h   \r
+\r
+          0 Warnings\r
+          0 Errors\r
diff --git a/org.simantics.fmu/FMUSolution/zlib-1.2.6/contrib/masmx64/gvmat64.obj b/org.simantics.fmu/FMUSolution/zlib-1.2.6/contrib/masmx64/gvmat64.obj
new file mode 100644 (file)
index 0000000..dc25f15
Binary files /dev/null and b/org.simantics.fmu/FMUSolution/zlib-1.2.6/contrib/masmx64/gvmat64.obj differ
diff --git a/org.simantics.fmu/FMUSolution/zlib-1.2.6/contrib/masmx64/inffasx64.lst b/org.simantics.fmu/FMUSolution/zlib-1.2.6/contrib/masmx64/inffasx64.lst
new file mode 100644 (file)
index 0000000..53b89a6
--- /dev/null
@@ -0,0 +1,488 @@
+Microsoft (R) Macro Assembler (x64) Version 10.00.40219.01  05/20/14 09:52:26\r
+inffasx64.asm                                               Page 1 - 1\r
+\r
+\r
+                               ; inffasx64.asm is a hand tuned assembler version of inffast.c - fast decoding\r
+                               ; version for AMD64 on Windows using Microsoft C compiler\r
+                               ;\r
+                               ; inffasx64.asm is automatically convert from AMD64 portion of inffas86.c\r
+                               ; inffasx64.asm is called by inffas8664.c, which contain more info.\r
+\r
+\r
+                               ; to compile this file, I use option\r
+                               ;   ml64.exe /Flinffasx64 /c /Zi inffasx64.asm\r
+                               ;   with Microsoft Macro Assembler (x64) for AMD64\r
+                               ;\r
+\r
+                               ; This file compile with Microsoft Macro Assembler (x64) for AMD64\r
+                               ;\r
+                               ;   ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK\r
+                               ;\r
+                               ;   (you can get Windows WDK with ml64 for AMD64 from\r
+                               ;      http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price)\r
+                               ;\r
+\r
+\r
+ 00000000                      .code\r
+ 00000000                      inffas8664fnc PROC\r
+\r
+                               ; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and\r
+                               ; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp\r
+                               ;\r
+                               ; All registers must be preserved across the call, except for\r
+                               ;   rax, rcx, rdx, r8, r-9, r10, and r11, which are scratch.\r
+\r
+\r
+ 00000000  48/ 89 74 24                        mov [rsp-8],rsi\r
+          F8\r
+ 00000005  48/ 89 7C 24                        mov [rsp-16],rdi\r
+          F0\r
+ 0000000A  4C/ 89 64 24                        mov [rsp-24],r12\r
+          E8\r
+ 0000000F  4C/ 89 6C 24                        mov [rsp-32],r13\r
+          E0\r
+ 00000014  4C/ 89 74 24                        mov [rsp-40],r14\r
+          D8\r
+ 00000019  4C/ 89 7C 24                        mov [rsp-48],r15\r
+          D0\r
+ 0000001E  48/ 89 5C 24                        mov [rsp-56],rbx\r
+          C8\r
+\r
+ 00000023  48/ 8B C1                   mov rax,rcx\r
+\r
+ 00000026  48/ 89 68 08                        mov     [rax+8], rbp       ; /* save regs rbp and rsp */\r
+ 0000002A  48/ 89 20                   mov     [rax], rsp\r
+\r
+ 0000002D  48/ 8B E0                   mov     rsp, rax          ; /* make rsp point to &ar */\r
+\r
+ 00000030  48/ 8B 74 24                        mov     rsi, [rsp+16]      ; /* rsi  = in */\r
+          10\r
+ 00000035  48/ 8B 7C 24                        mov     rdi, [rsp+32]      ; /* rdi  = out */\r
+          20\r
+ 0000003A  4C/ 8B 4C 24                        mov     r9, [rsp+24]       ; /* r9   = last */\r
+          18\r
+ 0000003F  4C/ 8B 54 24                        mov     r10, [rsp+48]      ; /* r10  = end */\r
+          30\r
+ 00000044  48/ 8B 6C 24                        mov     rbp, [rsp+64]      ; /* rbp  = lcode */\r
+          40\r
+ 00000049  4C/ 8B 5C 24                        mov     r11, [rsp+72]      ; /* r11  = dcode */\r
+          48\r
+ 0000004E  48/ 8B 54 24                        mov     rdx, [rsp+80]      ; /* rdx  = hold */\r
+          50\r
+ 00000053  8B 5C 24 58                 mov     ebx, [rsp+88]      ; /* ebx  = bits */\r
+ 00000057  44/ 8B 64 24                        mov     r12d, [rsp+100]    ; /* r12d = lmask */\r
+          64\r
+ 0000005C  44/ 8B 6C 24                        mov     r13d, [rsp+104]    ; /* r13d = dmask */\r
+          68\r
+                                                                         ; /* r14d = len */\r
+                                                                         ; /* r15d = dist */\r
+\r
+\r
+ 00000061  FC                          cld\r
+ 00000062  4C/ 3B D7                   cmp     r10, rdi\r
+ 00000065  74 05                       je      L_one_time           ; /* if only one decode left */\r
+ 00000067  4C/ 3B CE                   cmp     r9, rsi\r
+\r
+ 0000006A  75 2A                   jne L_do_loop\r
+\r
+\r
+ 0000006C                      L_one_time:\r
+ 0000006C  4D/ 8B C4                   mov     r8, r12           ; /* r8 = lmask */\r
+ 0000006F  80 FB 20                    cmp     bl, 32\r
+ 00000072  77 50                       ja      L_get_length_code_one_time\r
+\r
+ 00000074  AD                          lodsd                         ; /* eax = *(uint *)in++ */\r
+ 00000075  8A CB                       mov     cl, bl            ; /* cl = bits, needs it for shifting */\r
+ 00000077  80 C3 20                    add     bl, 32             ; /* bits += 32 */\r
+ 0000007A  48/ D3 E0                   shl     rax, cl\r
+ 0000007D  48/ 0B D0                   or      rdx, rax          ; /* hold |= *((uint *)in)++ << bits */\r
+ 00000080  EB 42                       jmp     L_get_length_code_one_time\r
+\r
+                               ALIGN 4\r
+ 00000084                      L_while_test:\r
+ 00000084  4C/ 3B D7                   cmp     r10, rdi\r
+ 00000087  0F 86 0000023F              jbe     L_break_loop\r
+ 0000008D  4C/ 3B CE                   cmp     r9, rsi\r
+ 00000090  0F 86 00000236              jbe     L_break_loop\r
+\r
+ 00000096                      L_do_loop:\r
+ 00000096  4D/ 8B C4                   mov     r8, r12           ; /* r8 = lmask */\r
+ 00000099  80 FB 20                    cmp     bl, 32\r
+ 0000009C  77 0C                       ja      L_get_length_code    ; /* if (32 < bits) */\r
+\r
+ 0000009E  AD                          lodsd                         ; /* eax = *(uint *)in++ */\r
+ 0000009F  8A CB                       mov     cl, bl            ; /* cl = bits, needs it for shifting */\r
+ 000000A1  80 C3 20                    add     bl, 32             ; /* bits += 32 */\r
+ 000000A4  48/ D3 E0                   shl     rax, cl\r
+ 000000A7  48/ 0B D0                   or      rdx, rax          ; /* hold |= *((uint *)in)++ << bits */\r
+\r
+ 000000AA                      L_get_length_code:\r
+ 000000AA  4C/ 23 C2                   and     r8, rdx            ; /* r8 &= hold */\r
+ 000000AD  42/ 8B 44 85                        mov     eax, [rbp+r8*4]  ; /* eax = lcode[hold & lmask] */\r
+          00\r
+\r
+ 000000B2  8A CC                       mov     cl, ah            ; /* cl = this.bits */\r
+ 000000B4  2A DC                       sub     bl, ah            ; /* bits -= this.bits */\r
+ 000000B6  48/ D3 EA                   shr     rdx, cl           ; /* hold >>= this.bits */\r
+\r
+ 000000B9  84 C0                       test    al, al\r
+ 000000BB  75 23                       jnz     L_test_for_length_base ; /* if (op != 0) 45.7% */\r
+\r
+ 000000BD  4D/ 8B C4                   mov     r8, r12            ; /* r8 = lmask */\r
+ 000000C0  C1 E8 10                    shr     eax, 16            ; /* output this.val char */\r
+ 000000C3  AA                          stosb\r
+\r
+ 000000C4                      L_get_length_code_one_time:\r
+ 000000C4  4C/ 23 C2                   and     r8, rdx            ; /* r8 &= hold */\r
+ 000000C7  42/ 8B 44 85                        mov     eax, [rbp+r8*4] ; /* eax = lcode[hold & lmask] */\r
+          00\r
+\r
+ 000000CC                      L_dolen:\r
+ 000000CC  8A CC                       mov     cl, ah            ; /* cl = this.bits */\r
+ 000000CE  2A DC                       sub     bl, ah            ; /* bits -= this.bits */\r
+ 000000D0  48/ D3 EA                   shr     rdx, cl           ; /* hold >>= this.bits */\r
+\r
+ 000000D3  84 C0                       test    al, al\r
+ 000000D5  75 09                       jnz     L_test_for_length_base ; /* if (op != 0) 45.7% */\r
+\r
+ 000000D7  C1 E8 10                    shr     eax, 16            ; /* output this.val char */\r
+ 000000DA  AA                          stosb\r
+ 000000DB  EB A7                       jmp     L_while_test\r
+\r
+                               ALIGN 4\r
+ 000000E0                      L_test_for_length_base:\r
+ 000000E0  44/ 8B F0                   mov     r14d, eax         ; /* len = this */\r
+ 000000E3  41/ C1 EE 10                        shr     r14d, 16           ; /* len = this.val */\r
+ 000000E7  8A C8                       mov     cl, al\r
+\r
+ 000000E9  A8 10                       test    al, 16\r
+ 000000EB  0F 84 000000C7              jz      L_test_for_second_level_length ; /* if ((op & 16) == 0) 8% */\r
+ 000000F1  80 E1 0F                    and     cl, 15             ; /* op &= 15 */\r
+ 000000F4  74 12                       jz      L_decode_distance    ; /* if (!op) */\r
+\r
+ 000000F6                      L_add_bits_to_len:\r
+ 000000F6  2A D9                       sub     bl, cl\r
+ 000000F8  33 C0                       xor     eax, eax\r
+ 000000FA  FF C0                       inc     eax\r
+ 000000FC  D3 E0                       shl     eax, cl\r
+ 000000FE  FF C8                       dec     eax\r
+ 00000100  23 C2                       and     eax, edx          ; /* eax &= hold */\r
+ 00000102  48/ D3 EA                   shr     rdx, cl\r
+ 00000105  44/ 03 F0                   add     r14d, eax         ; /* len += hold & mask[op] */\r
+\r
+ 00000108                      L_decode_distance:\r
+ 00000108  4D/ 8B C5                   mov     r8, r13           ; /* r8 = dmask */\r
+ 0000010B  80 FB 20                    cmp     bl, 32\r
+ 0000010E  77 0C                       ja      L_get_distance_code  ; /* if (32 < bits) */\r
+\r
+ 00000110  AD                          lodsd                         ; /* eax = *(uint *)in++ */\r
+ 00000111  8A CB                       mov     cl, bl            ; /* cl = bits, needs it for shifting */\r
+ 00000113  80 C3 20                    add     bl, 32             ; /* bits += 32 */\r
+ 00000116  48/ D3 E0                   shl     rax, cl\r
+ 00000119  48/ 0B D0                   or      rdx, rax          ; /* hold |= *((uint *)in)++ << bits */\r
+\r
+ 0000011C                      L_get_distance_code:\r
+ 0000011C  4C/ 23 C2                   and     r8, rdx           ; /* r8 &= hold */\r
+ 0000011F  43/ 8B 04 83                        mov     eax, [r11+r8*4] ; /* eax = dcode[hold & dmask] */\r
+\r
+ 00000123                      L_dodist:\r
+ 00000123  44/ 8B F8                   mov     r15d, eax         ; /* dist = this */\r
+ 00000126  41/ C1 EF 10                        shr     r15d, 16           ; /* dist = this.val */\r
+ 0000012A  8A CC                       mov     cl, ah\r
+ 0000012C  2A DC                       sub     bl, ah            ; /* bits -= this.bits */\r
+ 0000012E  48/ D3 EA                   shr     rdx, cl           ; /* hold >>= this.bits */\r
+ 00000131  8A C8                       mov     cl, al            ; /* cl = this.op */\r
+\r
+ 00000133  A8 10                       test    al, 16             ; /* if ((op & 16) == 0) */\r
+ 00000135  0F 84 0000009D              jz      L_test_for_second_level_dist\r
+ 0000013B  80 E1 0F                    and     cl, 15             ; /* op &= 15 */\r
+ 0000013E  74 50                       jz      L_check_dist_one\r
+\r
+ 00000140                      L_add_bits_to_dist:\r
+ 00000140  2A D9                       sub     bl, cl\r
+ 00000142  33 C0                       xor     eax, eax\r
+ 00000144  FF C0                       inc     eax\r
+ 00000146  D3 E0                       shl     eax, cl\r
+ 00000148  FF C8                       dec     eax                 ; /* (1 << op) - 1 */\r
+ 0000014A  23 C2                       and     eax, edx          ; /* eax &= hold */\r
+ 0000014C  48/ D3 EA                   shr     rdx, cl\r
+ 0000014F  44/ 03 F8                   add     r15d, eax         ; /* dist += hold & ((1 << op) - 1) */\r
+\r
+ 00000152                      L_check_window:\r
+ 00000152  4C/ 8B C6                   mov     r8, rsi           ; /* save in so from can use it's reg */\r
+ 00000155  48/ 8B C7                   mov     rax, rdi\r
+ 00000158  48/ 2B 44 24                        sub     rax, [rsp+40]      ; /* nbytes = out - beg */\r
+          28\r
+\r
+ 0000015D  41/ 3B C7                   cmp     eax, r15d\r
+ 00000160  0F 82 00000092              jb      L_clip_window        ; /* if (dist > nbytes) 4.2% */\r
+\r
+ 00000166  41/ 8B CE                   mov     ecx, r14d         ; /* ecx = len */\r
+ 00000169  48/ 8B F7                   mov     rsi, rdi\r
+ 0000016C  49/ 2B F7                   sub     rsi, r15          ; /* from = out - dist */\r
+\r
+ 0000016F  D1 F9                       sar     ecx, 1\r
+ 00000171  73 12                       jnc     L_copy_two           ; /* if len % 2 == 0 */\r
+\r
+ 00000173  F3/ 66| A5                  rep     movsw\r
+ 00000176  8A 06                       mov     al, [rsi]\r
+ 00000178  88 07                       mov     [rdi], al\r
+ 0000017A  48/ FF C7                   inc     rdi\r
+\r
+ 0000017D  49/ 8B F0                   mov     rsi, r8           ; /* move in back to %rsi, toss from */\r
+ 00000180  E9 FFFFFEFF                 jmp     L_while_test\r
+\r
+ 00000185                      L_copy_two:\r
+ 00000185  F3/ 66| A5                  rep     movsw\r
+ 00000188  49/ 8B F0                   mov     rsi, r8           ; /* move in back to %rsi, toss from */\r
+ 0000018B  E9 FFFFFEF4                 jmp     L_while_test\r
+\r
+                               ALIGN 4\r
+ 00000190                      L_check_dist_one:\r
+ 00000190  41/ 83 FF 01                        cmp     r15d, 1            ; /* if dist 1, is a memset */\r
+ 00000194  75 BC                       jne     L_check_window\r
+ 00000196  48/ 39 7C 24                        cmp     [rsp+40], rdi      ; /* if out == beg, outside window */\r
+          28\r
+ 0000019B  74 B5                       je      L_check_window\r
+\r
+ 0000019D  41/ 8B CE                   mov     ecx, r14d         ; /* ecx = len */\r
+ 000001A0  8A 47 FF                    mov     al, [rdi-1]\r
+ 000001A3  8A E0                       mov     ah, al\r
+\r
+ 000001A5  D1 F9                       sar     ecx, 1\r
+ 000001A7  73 05                       jnc     L_set_two\r
+ 000001A9  88 07                       mov     [rdi], al\r
+ 000001AB  48/ FF C7                   inc     rdi\r
+\r
+ 000001AE                      L_set_two:\r
+ 000001AE  F3/ 66| AB                  rep     stosw\r
+ 000001B1  E9 FFFFFECE                 jmp     L_while_test\r
+\r
+                               ALIGN 4\r
+ 000001B8                      L_test_for_second_level_length:\r
+ 000001B8  A8 40                       test    al, 64\r
+ 000001BA  0F 85 000000E0              jnz     L_test_for_end_of_block ; /* if ((op & 64) != 0) */\r
+\r
+ 000001C0  33 C0                       xor     eax, eax\r
+ 000001C2  FF C0                       inc     eax\r
+ 000001C4  D3 E0                       shl     eax, cl\r
+ 000001C6  FF C8                       dec     eax\r
+ 000001C8  23 C2                       and     eax, edx         ; /* eax &= hold */\r
+ 000001CA  41/ 03 C6                   add     eax, r14d        ; /* eax += len */\r
+ 000001CD  8B 44 85 00                 mov     eax, [rbp+rax*4] ; /* eax = lcode[val+(hold&mask[op])]*/\r
+ 000001D1  E9 FFFFFEF6                 jmp     L_dolen\r
+\r
+                               ALIGN 4\r
+ 000001D8                      L_test_for_second_level_dist:\r
+ 000001D8  A8 40                       test    al, 64\r
+ 000001DA  0F 85 000000D8              jnz     L_invalid_distance_code ; /* if ((op & 64) != 0) */\r
+\r
+ 000001E0  33 C0                       xor     eax, eax\r
+ 000001E2  FF C0                       inc     eax\r
+ 000001E4  D3 E0                       shl     eax, cl\r
+ 000001E6  FF C8                       dec     eax\r
+ 000001E8  23 C2                       and     eax, edx         ; /* eax &= hold */\r
+ 000001EA  41/ 03 C7                   add     eax, r15d        ; /* eax += dist */\r
+ 000001ED  41/ 8B 04 83                        mov     eax, [r11+rax*4] ; /* eax = dcode[val+(hold&mask[op])]*/\r
+ 000001F1  E9 FFFFFF2D                 jmp     L_dodist\r
+\r
+                               ALIGN 4\r
+ 000001F8                      L_clip_window:\r
+ 000001F8  8B C8                       mov     ecx, eax         ; /* ecx = nbytes */\r
+ 000001FA  8B 44 24 5C                 mov     eax, [rsp+92]     ; /* eax = wsize, prepare for dist cmp */\r
+ 000001FE  F7 D9                       neg     ecx                ; /* nbytes = -nbytes */\r
+\r
+ 00000200  41/ 3B C7                   cmp     eax, r15d\r
+ 00000203  0F 82 000000B9              jb      L_invalid_distance_too_far ; /* if (dist > wsize) */\r
+\r
+ 00000209  41/ 03 CF                   add     ecx, r15d         ; /* nbytes = dist - nbytes */\r
+ 0000020C  83 7C 24 60 00              cmp     dword ptr [rsp+96], 0\r
+ 00000211  75 21                       jne     L_wrap_around_window ; /* if (write != 0) */\r
+\r
+ 00000213  48/ 8B 74 24                        mov     rsi, [rsp+56]     ; /* from  = window */\r
+          38\r
+ 00000218  2B C1                       sub     eax, ecx         ; /* eax  -= nbytes */\r
+ 0000021A  48/ 03 F0                   add     rsi, rax         ; /* from += wsize - nbytes */\r
+\r
+ 0000021D  41/ 8B C6                   mov     eax, r14d        ; /* eax = len */\r
+ 00000220  44/ 3B F1                   cmp     r14d, ecx\r
+ 00000223  76 6F                       jbe     L_do_copy           ; /* if (nbytes >= len) */\r
+\r
+ 00000225  2B C1                       sub     eax, ecx         ; /* eax -= nbytes */\r
+ 00000227  F3/ A4                      rep     movsb\r
+ 00000229  48/ 8B F7                   mov     rsi, rdi\r
+ 0000022C  49/ 2B F7                   sub     rsi, r15         ; /* from = &out[ -dist ] */\r
+ 0000022F  EB 63                       jmp     L_do_copy\r
+\r
+                               ALIGN 4\r
+ 00000234                      L_wrap_around_window:\r
+ 00000234  8B 44 24 60                 mov     eax, [rsp+96]     ; /* eax = write */\r
+ 00000238  3B C8                       cmp     ecx, eax\r
+ 0000023A  76 38                       jbe     L_contiguous_in_window ; /* if (write >= nbytes) */\r
+\r
+ 0000023C  8B 74 24 5C                 mov     esi, [rsp+92]     ; /* from  = wsize */\r
+ 00000240  48/ 03 74 24                        add     rsi, [rsp+56]     ; /* from += window */\r
+          38\r
+ 00000245  48/ 03 F0                   add     rsi, rax         ; /* from += write */\r
+ 00000248  48/ 2B F1                   sub     rsi, rcx         ; /* from -= nbytes */\r
+ 0000024B  2B C8                       sub     ecx, eax         ; /* nbytes -= write */\r
+\r
+ 0000024D  41/ 8B C6                   mov     eax, r14d        ; /* eax = len */\r
+ 00000250  3B C1                       cmp     eax, ecx\r
+ 00000252  76 40                       jbe     L_do_copy           ; /* if (nbytes >= len) */\r
+\r
+ 00000254  2B C1                       sub     eax, ecx         ; /* len -= nbytes */\r
+ 00000256  F3/ A4                      rep     movsb\r
+ 00000258  48/ 8B 74 24                        mov     rsi, [rsp+56]     ; /* from = window */\r
+          38\r
+ 0000025D  8B 4C 24 60                 mov     ecx, [rsp+96]     ; /* nbytes = write */\r
+ 00000261  3B C1                       cmp     eax, ecx\r
+ 00000263  76 2F                       jbe     L_do_copy           ; /* if (nbytes >= len) */\r
+\r
+ 00000265  2B C1                       sub     eax, ecx         ; /* len -= nbytes */\r
+ 00000267  F3/ A4                      rep     movsb\r
+ 00000269  48/ 8B F7                   mov     rsi, rdi\r
+ 0000026C  49/ 2B F7                   sub     rsi, r15         ; /* from = out - dist */\r
+ 0000026F  EB 23                       jmp     L_do_copy\r
+\r
+                               ALIGN 4\r
+ 00000274                      L_contiguous_in_window:\r
+ 00000274  48/ 8B 74 24                        mov     rsi, [rsp+56]     ; /* rsi = window */\r
+          38\r
+ 00000279  48/ 03 F0                   add     rsi, rax\r
+ 0000027C  48/ 2B F1                   sub     rsi, rcx         ; /* from += write - nbytes */\r
+\r
+ 0000027F  41/ 8B C6                   mov     eax, r14d        ; /* eax = len */\r
+ 00000282  3B C1                       cmp     eax, ecx\r
+ 00000284  76 0E                       jbe     L_do_copy           ; /* if (nbytes >= len) */\r
+\r
+ 00000286  2B C1                       sub     eax, ecx         ; /* len -= nbytes */\r
+ 00000288  F3/ A4                      rep     movsb\r
+ 0000028A  48/ 8B F7                   mov     rsi, rdi\r
+ 0000028D  49/ 2B F7                   sub     rsi, r15         ; /* from = out - dist */\r
+ 00000290  EB 02                       jmp     L_do_copy           ; /* if (nbytes >= len) */\r
+\r
+                               ALIGN 4\r
+ 00000294                      L_do_copy:\r
+ 00000294  8B C8                       mov     ecx, eax         ; /* ecx = len */\r
+ 00000296  F3/ A4                      rep     movsb\r
+\r
+ 00000298  49/ 8B F0                   mov     rsi, r8          ; /* move in back to %esi, toss from */\r
+ 0000029B  E9 FFFFFDE4                 jmp     L_while_test\r
+\r
+ 000002A0                      L_test_for_end_of_block:\r
+ 000002A0  A8 20                       test    al, 32\r
+ 000002A2  74 0A                       jz      L_invalid_literal_length_code\r
+ 000002A4  C7 44 24 74                 mov     dword ptr [rsp+116], 1\r
+          00000001\r
+ 000002AC  EB 26                       jmp     L_break_loop_with_status\r
+\r
+ 000002AE                      L_invalid_literal_length_code:\r
+ 000002AE  C7 44 24 74                 mov     dword ptr [rsp+116], 2\r
+          00000002\r
+ 000002B6  EB 1C                       jmp     L_break_loop_with_status\r
+\r
+ 000002B8                      L_invalid_distance_code:\r
+ 000002B8  C7 44 24 74                 mov     dword ptr [rsp+116], 3\r
+          00000003\r
+ 000002C0  EB 12                       jmp     L_break_loop_with_status\r
+\r
+ 000002C2                      L_invalid_distance_too_far:\r
+ 000002C2  C7 44 24 74                 mov     dword ptr [rsp+116], 4\r
+          00000004\r
+ 000002CA  EB 08                       jmp     L_break_loop_with_status\r
+\r
+ 000002CC                      L_break_loop:\r
+ 000002CC  C7 44 24 74                 mov     dword ptr [rsp+116], 0\r
+          00000000\r
+\r
+ 000002D4                      L_break_loop_with_status:\r
+                               ; /* put in, out, bits, and hold back into ar and pop esp */\r
+ 000002D4  48/ 89 74 24                        mov     [rsp+16], rsi     ; /* in */\r
+          10\r
+ 000002D9  48/ 89 7C 24                        mov     [rsp+32], rdi     ; /* out */\r
+          20\r
+ 000002DE  89 5C 24 58                 mov     [rsp+88], ebx     ; /* bits */\r
+ 000002E2  48/ 89 54 24                        mov     [rsp+80], rdx     ; /* hold */\r
+          50\r
+\r
+ 000002E7  48/ 8B 04 24                        mov     rax, [rsp]       ; /* restore rbp and rsp */\r
+ 000002EB  48/ 8B 6C 24                        mov     rbp, [rsp+8]\r
+          08\r
+ 000002F0  48/ 8B E0                   mov     rsp, rax\r
+\r
+\r
+\r
+ 000002F3  48/ 8B 74 24                        mov rsi,[rsp-8]\r
+          F8\r
+ 000002F8  48/ 8B 7C 24                        mov rdi,[rsp-16]\r
+          F0\r
+ 000002FD  4C/ 8B 64 24                        mov r12,[rsp-24]\r
+          E8\r
+ 00000302  4C/ 8B 6C 24                        mov r13,[rsp-32]\r
+          E0\r
+ 00000307  4C/ 8B 74 24                        mov r14,[rsp-40]\r
+          D8\r
+ 0000030C  4C/ 8B 7C 24                        mov r15,[rsp-48]\r
+          D0\r
+ 00000311  48/ 8B 5C 24                        mov rbx,[rsp-56]\r
+          C8\r
+\r
+ 00000316  C3                      ret 0\r
+                               ;          :\r
+                               ;          : "m" (ar)\r
+                               ;          : "memory", "%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi",\r
+                               ;            "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"\r
+                               ;    );\r
+\r
+ 00000317                      inffas8664fnc   ENDP\r
+                               ;_TEXT  ENDS\r
+                               END\r
+\fMicrosoft (R) Macro Assembler (x64) Version 10.00.40219.01  05/20/14 09:52:26\r
+inffasx64.asm                                               Symbols 2 - 1\r
+\r
+\r
+\r
+\r
+Procedures, parameters, and locals:\r
+\r
+                N a m e                 Type     Value    Attr\r
+\r
+inffas8664fnc  . . . . . . . . .       P        00000000 _TEXT Length= 00000317 Public\r
+  L_one_time . . . . . . . . . .       L        0000006C _TEXT \r
+  L_while_test . . . . . . . . .       L        00000084 _TEXT \r
+  L_do_loop  . . . . . . . . . .       L        00000096 _TEXT \r
+  L_get_length_code  . . . . . .       L        000000AA _TEXT \r
+  L_get_length_code_one_time . .       L        000000C4 _TEXT \r
+  L_dolen  . . . . . . . . . . .       L        000000CC _TEXT \r
+  L_test_for_length_base . . . .       L        000000E0 _TEXT \r
+  L_add_bits_to_len  . . . . . .       L        000000F6 _TEXT \r
+  L_decode_distance  . . . . . .       L        00000108 _TEXT \r
+  L_get_distance_code  . . . . .       L        0000011C _TEXT \r
+  L_dodist . . . . . . . . . . .       L        00000123 _TEXT \r
+  L_add_bits_to_dist . . . . . .       L        00000140 _TEXT \r
+  L_check_window . . . . . . . .       L        00000152 _TEXT \r
+  L_copy_two . . . . . . . . . .       L        00000185 _TEXT \r
+  L_check_dist_one . . . . . . .       L        00000190 _TEXT \r
+  L_set_two  . . . . . . . . . .       L        000001AE _TEXT \r
+  L_test_for_second_level_length .     L        000001B8 _TEXT \r
+  L_test_for_second_level_dist .       L        000001D8 _TEXT \r
+  L_clip_window  . . . . . . . .       L        000001F8 _TEXT \r
+  L_wrap_around_window . . . . .       L        00000234 _TEXT \r
+  L_contiguous_in_window . . . .       L        00000274 _TEXT \r
+  L_do_copy  . . . . . . . . . .       L        00000294 _TEXT \r
+  L_test_for_end_of_block  . . .       L        000002A0 _TEXT \r
+  L_invalid_literal_length_code        L        000002AE _TEXT \r
+  L_invalid_distance_code  . . .       L        000002B8 _TEXT \r
+  L_invalid_distance_too_far . .       L        000002C2 _TEXT \r
+  L_break_loop . . . . . . . . .       L        000002CC _TEXT \r
+  L_break_loop_with_status . . .       L        000002D4 _TEXT \r
+\r
+\r
+Symbols:\r
+\r
+                N a m e                 Type     Value    Attr\r
+\r
+\r
+          0 Warnings\r
+          0 Errors\r
diff --git a/org.simantics.fmu/FMUSolution/zlib-1.2.6/contrib/masmx64/inffasx64.obj b/org.simantics.fmu/FMUSolution/zlib-1.2.6/contrib/masmx64/inffasx64.obj
new file mode 100644 (file)
index 0000000..7136ecc
Binary files /dev/null and b/org.simantics.fmu/FMUSolution/zlib-1.2.6/contrib/masmx64/inffasx64.obj differ
index c34cd847cf303fb47c964d2f09641381f9da2e3d..7973206069a51da7498989cbf214ed9e1c4372f3 100644 (file)
@@ -48,7 +48,7 @@
     <CharacterSet>MultiByte</CharacterSet>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
+    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <CharacterSet>MultiByte</CharacterSet>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
@@ -95,7 +95,7 @@
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\MiniUnzip$(Configuration)\Tmp\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>\r
     <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">false</GenerateManifest>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\MiniUnzip$(Configuration)\</OutDir>\r
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>\r
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\MiniUnzip$(Configuration)\Tmp\</IntDir>\r
     <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
     <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>\r
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>\r
       <OmitFramePointers>true</OmitFramePointers>\r
       <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;EXTRACT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <StringPooling>true</StringPooling>\r
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
       <BufferSecurityCheck>false</BufferSecurityCheck>\r
       <FunctionLevelLinking>true</FunctionLevelLinking>\r
       <PrecompiledHeader>\r
     </ClCompile>\r
     <Link>\r
       <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <OutputFile>$(OutDir)miniunz.exe</OutputFile>\r
+      <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
       <SubSystem>Console</SubSystem>\r
       <OptimizeReferences>true</OptimizeReferences>\r