Skip to content

Commit

Permalink
[NanaZip.Core] Update 7-Zip to 24.05. (Thanks to Igor Pavlov. Noticed…
Browse files Browse the repository at this point in the history
… by AVMLOVER-4885955 and PopuriAO29.)
  • Loading branch information
MouriNaruto committed May 16, 2024
1 parent f580558 commit 4d21f72
Show file tree
Hide file tree
Showing 321 changed files with 28,420 additions and 9,160 deletions.
4 changes: 3 additions & 1 deletion NanaZip.Core/NanaZip.Core.Sfx.Shared.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<ItemDefinitionGroup>
<ClCompile>
<EnableEnhancedInstructionSet Condition="'$(Platform)'=='Win32'">NoExtensions</EnableEnhancedInstructionSet>
<PreprocessorDefinitions>Z7_EXTRACT_ONLY;Z7_NO_READ_FROM_CODER;Z7_SFX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>Z7_EXTRACT_ONLY;Z7_NO_READ_FROM_CODER;Z7_SFX;Z7_NO_LONG_PATH;Z7_NO_LARGE_PAGES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Platform)'=='x64'">Z7_LZMA_DEC_OPT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4113;</DisableSpecificWarnings>
</ClCompile>
Expand Down Expand Up @@ -93,6 +93,7 @@
<ClCompile Include="SevenZip\CPP\Windows\PropVariantConv.cpp" />
<ClCompile Include="SevenZip\CPP\Windows\Synchronization.cpp" />
<ClCompile Include="SevenZip\CPP\Windows\System.cpp" />
<ClCompile Include="SevenZip\CPP\Windows\TimeUtils.cpp" />
<ClCompile Include="SevenZip\C\7zCrc.c" />
<ClCompile Include="SevenZip\C\7zStream.c" />
<ClCompile Include="SevenZip\C\Aes.c" />
Expand Down Expand Up @@ -165,6 +166,7 @@
<ClInclude Include="SevenZip\CPP\7zip\IStream.h" />
<ClInclude Include="SevenZip\CPP\7zip\PropID.h" />
<ClInclude Include="SevenZip\CPP\Common\Common.h" />
<ClInclude Include="SevenZip\CPP\Common\Common0.h" />
<ClInclude Include="SevenZip\CPP\Common\ComTry.h" />
<ClInclude Include="SevenZip\CPP\Common\Defs.h" />
<ClInclude Include="SevenZip\CPP\Common\IntToString.h" />
Expand Down
6 changes: 6 additions & 0 deletions NanaZip.Core/NanaZip.Core.Sfx.Shared.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@
<ClCompile Include="SevenZip\CPP\7zip\Archive\7z\7zRegister.cpp">
<Filter>SevenZip\CPP\7zip\Archive\7z</Filter>
</ClCompile>
<ClCompile Include="SevenZip\CPP\Windows\TimeUtils.cpp">
<Filter>SevenZip\CPP\Windows</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Extensions\ZSCodecs\ZstdDecoder.h">
Expand Down Expand Up @@ -620,6 +623,9 @@
<ClInclude Include="SevenZip\CPP\7zip\Archive\7z\StdAfx.h">
<Filter>SevenZip\CPP\7zip\Archive\7z</Filter>
</ClInclude>
<ClInclude Include="SevenZip\CPP\Common\Common0.h">
<Filter>SevenZip\CPP\Common</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Text Include="SevenZip\CPP\7zip\Guid.txt">
Expand Down
2 changes: 2 additions & 0 deletions NanaZip.Core/NanaZip.Core.Sfx.Windows.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@
<ClInclude Include="SevenZip\CPP\7zip\UI\FileManager\ExtractCallback.h" />
<ClInclude Include="SevenZip\CPP\7zip\UI\FileManager\FormatUtils.h" />
<ClInclude Include="SevenZip\CPP\7zip\UI\FileManager\LangUtils.h" />
<ClInclude Include="SevenZip\CPP\7zip\UI\FileManager\MemDialog.h" />
<ClInclude Include="SevenZip\CPP\7zip\UI\FileManager\MemDialogRes.h" />
<ClInclude Include="SevenZip\CPP\7zip\UI\FileManager\MyWindowsNew.h" />
<ClInclude Include="SevenZip\CPP\7zip\UI\FileManager\OverwriteDialog.h" />
<ClInclude Include="SevenZip\CPP\7zip\UI\FileManager\OverwriteDialogRes.h" />
Expand Down
6 changes: 6 additions & 0 deletions NanaZip.Core/NanaZip.Core.Sfx.Windows.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,12 @@
<ClInclude Include="SevenZip\CPP\Windows\Registry.h">
<Filter>SevenZip\CPP\Windows</Filter>
</ClInclude>
<ClInclude Include="SevenZip\CPP\7zip\UI\FileManager\MemDialog.h">
<Filter>SevenZip\CPP\7zip\UI\FileManager</Filter>
</ClInclude>
<ClInclude Include="SevenZip\CPP\7zip\UI\FileManager\MemDialogRes.h">
<Filter>SevenZip\CPP\7zip\UI\FileManager</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="NanaZip.Core.Sfx.Windows.Resources.rc" />
Expand Down
13 changes: 12 additions & 1 deletion NanaZip.Core/NanaZip.Core.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<ItemDefinitionGroup>
<ClCompile>
<EnableEnhancedInstructionSet Condition="'$(Platform)'=='Win32'">NoExtensions</EnableEnhancedInstructionSet>
<PreprocessorDefinitions>Z7_EXTERNAL_CODECS;Z7_LARGE_PAGES;NSIS_SCRIPT;ZSTD_LEGACY_SUPPORT;ZSTD_MULTITHREAD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>Z7_EXTERNAL_CODECS;NSIS_SCRIPT;ZSTD_LEGACY_SUPPORT;ZSTD_MULTITHREAD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Platform)'=='x64'">Z7_LZMA_DEC_OPT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4100;4113;4127;4146;4189;4200;4244;4267;4334;4702;</DisableSpecificWarnings>
</ClCompile>
Expand Down Expand Up @@ -97,6 +97,7 @@
<ClCompile Include="SevenZip\CPP\7zip\Archive\ArchiveExports.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Archive\ArHandler.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Archive\ArjHandler.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Archive\AvbHandler.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Archive\Base64Handler.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Archive\Bz2Handler.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Archive\Cab\CabBlockInStream.cpp" />
Expand Down Expand Up @@ -136,6 +137,7 @@
<ClCompile Include="SevenZip\CPP\7zip\Archive\Iso\IsoIn.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Archive\Iso\IsoRegister.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Archive\LpHandler.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Archive\LvmHandler.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Archive\LzhHandler.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Archive\LzmaHandler.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Archive\MachoHandler.cpp" />
Expand Down Expand Up @@ -186,6 +188,7 @@
<ClCompile Include="SevenZip\CPP\7zip\Archive\Zip\ZipOut.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Archive\Zip\ZipRegister.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Archive\Zip\ZipUpdate.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Archive\ZstdHandler.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Common\CreateCoder.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Common\CWrappers.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Common\FilterCoder.cpp" />
Expand Down Expand Up @@ -257,6 +260,7 @@
<ClCompile Include="SevenZip\CPP\7zip\Compress\ZDecoder.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Compress\ZlibDecoder.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Compress\ZlibEncoder.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Compress\ZstdDecoder.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Crypto\7zAes.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Crypto\7zAesRegister.cpp" />
<ClCompile Include="SevenZip\CPP\7zip\Crypto\HmacSha1.cpp" />
Expand Down Expand Up @@ -289,6 +293,7 @@
<ClCompile Include="SevenZip\CPP\Common\StringToInt.cpp" />
<ClCompile Include="SevenZip\CPP\Common\UTFConvert.cpp" />
<ClCompile Include="SevenZip\CPP\Common\Wildcard.cpp" />
<ClCompile Include="SevenZip\CPP\Common\Xxh64Reg.cpp" />
<ClCompile Include="SevenZip\CPP\Common\XzCrc64Init.cpp" />
<ClCompile Include="SevenZip\CPP\Common\XzCrc64Reg.cpp" />
<ClCompile Include="SevenZip\CPP\Windows\FileDir.cpp" />
Expand Down Expand Up @@ -337,11 +342,13 @@
<ClCompile Include="SevenZip\C\Sort.c" />
<ClCompile Include="SevenZip\C\SwapBytes.c" />
<ClCompile Include="SevenZip\C\Threads.c" />
<ClCompile Include="SevenZip\C\Xxh64.c" />
<ClCompile Include="SevenZip\C\Xz.c" />
<ClCompile Include="SevenZip\C\XzCrc64.c" />
<ClCompile Include="SevenZip\C\XzDec.c" />
<ClCompile Include="SevenZip\C\XzEnc.c" />
<ClCompile Include="SevenZip\C\XzIn.c" />
<ClCompile Include="SevenZip\C\ZstdDec.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Extensions\ZSCodecs\BrotliDecoder.h" />
Expand Down Expand Up @@ -499,6 +506,7 @@
<ClInclude Include="SevenZip\CPP\7zip\Compress\ZDecoder.h" />
<ClInclude Include="SevenZip\CPP\7zip\Compress\ZlibDecoder.h" />
<ClInclude Include="SevenZip\CPP\7zip\Compress\ZlibEncoder.h" />
<ClInclude Include="SevenZip\CPP\7zip\Compress\ZstdDecoder.h" />
<ClInclude Include="SevenZip\CPP\7zip\Crypto\7zAes.h" />
<ClInclude Include="SevenZip\CPP\7zip\Crypto\HmacSha1.h" />
<ClInclude Include="SevenZip\CPP\7zip\Crypto\HmacSha256.h" />
Expand All @@ -522,6 +530,7 @@
<ClInclude Include="SevenZip\CPP\7zip\PropID.h" />
<ClInclude Include="SevenZip\CPP\Common\AutoPtr.h" />
<ClInclude Include="SevenZip\CPP\Common\Common.h" />
<ClInclude Include="SevenZip\CPP\Common\Common0.h" />
<ClInclude Include="SevenZip\CPP\Common\ComTry.h" />
<ClInclude Include="SevenZip\CPP\Common\Defs.h" />
<ClInclude Include="SevenZip\CPP\Common\DynamicBuffer.h" />
Expand Down Expand Up @@ -596,9 +605,11 @@
<ClInclude Include="SevenZip\C\Sort.h" />
<ClInclude Include="SevenZip\C\SwapBytes.h" />
<ClInclude Include="SevenZip\C\Threads.h" />
<ClInclude Include="SevenZip\C\Xxh64.h" />
<ClInclude Include="SevenZip\C\Xz.h" />
<ClInclude Include="SevenZip\C\XzCrc64.h" />
<ClInclude Include="SevenZip\C\XzEnc.h" />
<ClInclude Include="SevenZip\C\ZstdDec.h" />
</ItemGroup>
<ItemGroup>
<Text Include="SevenZip\CPP\7zip\Guid.txt" />
Expand Down
33 changes: 33 additions & 0 deletions NanaZip.Core/NanaZip.Core.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,27 @@
<ClCompile Include="Extensions\ZSCodecs\ZstdHandler.cpp">
<Filter>Extensions\ZSCodecs</Filter>
</ClCompile>
<ClCompile Include="SevenZip\C\Xxh64.c">
<Filter>SevenZip\C</Filter>
</ClCompile>
<ClCompile Include="SevenZip\C\ZstdDec.c">
<Filter>SevenZip\C</Filter>
</ClCompile>
<ClCompile Include="SevenZip\CPP\7zip\Archive\ZstdHandler.cpp">
<Filter>SevenZip\CPP\7zip\Archive</Filter>
</ClCompile>
<ClCompile Include="SevenZip\CPP\7zip\Archive\AvbHandler.cpp">
<Filter>SevenZip\CPP\7zip\Archive</Filter>
</ClCompile>
<ClCompile Include="SevenZip\CPP\7zip\Archive\LvmHandler.cpp">
<Filter>SevenZip\CPP\7zip\Archive</Filter>
</ClCompile>
<ClCompile Include="SevenZip\CPP\7zip\Compress\ZstdDecoder.cpp">
<Filter>SevenZip\CPP\7zip\Compress</Filter>
</ClCompile>
<ClCompile Include="SevenZip\CPP\Common\Xxh64Reg.cpp">
<Filter>SevenZip\CPP\Common</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="SevenZip\C\7zCrc.h">
Expand Down Expand Up @@ -1753,6 +1774,18 @@
<ClInclude Include="Extensions\ZSCodecs\FastLzma2Encoder.h">
<Filter>Extensions\ZSCodecs</Filter>
</ClInclude>
<ClInclude Include="SevenZip\C\Xxh64.h">
<Filter>SevenZip\C</Filter>
</ClInclude>
<ClInclude Include="SevenZip\C\ZstdDec.h">
<Filter>SevenZip\C</Filter>
</ClInclude>
<ClInclude Include="SevenZip\CPP\7zip\Compress\ZstdDecoder.h">
<Filter>SevenZip\CPP\7zip\Compress</Filter>
</ClInclude>
<ClInclude Include="SevenZip\CPP\Common\Common0.h">
<Filter>SevenZip\CPP\Common</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Text Include="SevenZip\CPP\7zip\Guid.txt">
Expand Down
68 changes: 60 additions & 8 deletions NanaZip.Core/SevenZip/ASM/x86/7zAsm.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; 7zAsm.asm -- ASM macros
; 2022-05-16 : Igor Pavlov : Public domain
; 2023-12-08 : Igor Pavlov : Public domain


; UASM can require these changes
Expand Down Expand Up @@ -43,7 +43,7 @@ else
endif
endif

OPTION PROLOGUE:NONE
OPTION PROLOGUE:NONE
OPTION EPILOGUE:NONE

MY_ASM_START macro
Expand Down Expand Up @@ -121,10 +121,29 @@ endif
x2_H equ DH
x3_H equ BH

; r0_L equ AL
; r1_L equ CL
; r2_L equ DL
; r3_L equ BL

; r0_H equ AH
; r1_H equ CH
; r2_H equ DH
; r3_H equ BH


ifdef x64
x5_L equ BPL
x6_L equ SIL
x7_L equ DIL
x8_L equ r8b
x9_L equ r9b
x10_L equ r10b
x11_L equ r11b
x12_L equ r12b
x13_L equ r13b
x14_L equ r14b
x15_L equ r15b

r0 equ RAX
r1 equ RCX
Expand Down Expand Up @@ -153,6 +172,22 @@ else
r7 equ x7
endif

x0_R equ r0
x1_R equ r1
x2_R equ r2
x3_R equ r3
x4_R equ r4
x5_R equ r5
x6_R equ r6
x7_R equ r7
x8_R equ r8
x9_R equ r9
x10_R equ r10
x11_R equ r11
x12_R equ r12
x13_R equ r13
x14_R equ r14
x15_R equ r15

ifdef x64
ifdef ABI_LINUX
Expand Down Expand Up @@ -200,6 +235,14 @@ REG_ABI_PARAM_0 equ REG_PARAM_0
REG_ABI_PARAM_1_x equ REG_PARAM_1_x
REG_ABI_PARAM_1 equ REG_PARAM_1

MY_PUSH_PRESERVED_ABI_REGS_UP_TO_INCLUDING_R11 macro
MY_PUSH_4_REGS
endm

MY_POP_PRESERVED_ABI_REGS_UP_TO_INCLUDING_R11 macro
MY_POP_4_REGS
endm

else
; x64

Expand Down Expand Up @@ -261,12 +304,25 @@ endm
endif ; IS_LINUX


MY_PUSH_PRESERVED_ABI_REGS macro
MY_PUSH_PRESERVED_ABI_REGS_UP_TO_INCLUDING_R11 macro
if (IS_LINUX gt 0)
MY_PUSH_2_REGS
else
MY_PUSH_4_REGS
endif
endm

MY_POP_PRESERVED_ABI_REGS_UP_TO_INCLUDING_R11 macro
if (IS_LINUX gt 0)
MY_POP_2_REGS
else
MY_POP_4_REGS
endif
endm


MY_PUSH_PRESERVED_ABI_REGS macro
MY_PUSH_PRESERVED_ABI_REGS_UP_TO_INCLUDING_R11
push r12
push r13
push r14
Expand All @@ -279,11 +335,7 @@ MY_POP_PRESERVED_ABI_REGS macro
pop r14
pop r13
pop r12
if (IS_LINUX gt 0)
MY_POP_2_REGS
else
MY_POP_4_REGS
endif
MY_POP_PRESERVED_ABI_REGS_UP_TO_INCLUDING_R11
endm

endif ; x64
Loading

0 comments on commit 4d21f72

Please sign in to comment.