Skip to content

Commit

Permalink
Refine LH/RH loading
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Nov 11, 2020
1 parent fb9bf2d commit 7f3702e
Show file tree
Hide file tree
Showing 47 changed files with 211 additions and 1,154 deletions.
79 changes: 76 additions & 3 deletions SynZip.pas
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,22 @@
- unit fixed and tested with Delphi XE2 (and up) 64-bit compiler
}
{$ifdef DARWIN}
{$ifdef CPUAARCH64}
//Apple's provided zlib just as fast as CloudFlare
//{$define USEZLIBSSE}
{$ELSE}
{$define USEZLIBSSE}
{$ENDIF}
{$endif}
{$ifdef LINUX}
{$define USEZLIBSSE}
{$endif}

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64



{$ifdef MSWINDOWS}
{$define USEZLIBSSE}
{$endif}
Expand All @@ -180,7 +193,7 @@
{$ifdef MSWINDOWS} // avoid link to zlib1.dll
{.$define USEPASZLIB} // paszlib makes Z_BUF_ERROR with bits = -MAX_WBITS
{$ifdef Win32}
{.$define USEZLIBSSE} // SynZLibSSE static .o files for FPC + Win32 fails
{.$define libz} // SynZLibSSE static .o files for FPC + Win32 fails
{$endif}
{$ifdef Win64}
{.$define USEEXTZLIB} // use zlib-64.dll as in \fpc-win64 sub-folder
Expand All @@ -190,7 +203,11 @@
{$ifdef ANDROID}
{$define USEPASZLIB} // Alf: problem with external zlib.so under Android
{$else}
{$ifdef USEZLIBSSE}
{.$define USEEXTZLIB}
{$ELSE}
{$define USEEXTZLIB}
{$ENDIF}
{$endif}
{$endif}
{$else}
Expand Down Expand Up @@ -5034,16 +5051,72 @@ function get_crc_table: pointer; cdecl;
{$LINK static\i386-win32\crc32.o}
{$linklib static\i386-win32\libmsvcrt.a}
{$endif}
{$ifdef LINUX}{$ifndef DARWIN}
{$ifdef USEZLIBSSE}
{$L .\x86_64-linux\adler32.o}
{$L .\x86_64-linux\adler32_simd.o}
{$L .\x86_64-linux\crc32.o}
{$L .\x86_64-linux\crc32_simd.o}
{$L .\x86_64-linux\deflate.o}
{$L .\x86_64-linux\inffast.o}
{$L .\x86_64-linux\inffast_chunk.o}
{$L .\x86_64-linux\inflate.o}
{$L .\x86_64-linux\inftrees.o}
{$L .\x86_64-linux\trees.o}
{$L .\x86_64-linux\zutil.o}
{$ENDIF}
{$ENDIF}{$ENDIF}
{$ifdef DARWIN}
{$ifdef USEZLIBSSE}
{$ifdef CPUAARCH64}
{$L .\aarch64-darwin\adler32.o}
{$L .\aarch64-darwin\adler32_simd.o}
{$L .\aarch64-darwin\crc32.o}
//{$L .\aarch64-darwin\crc32_simd.o}
{$L .\aarch64-darwin\deflate.o}
{$L .\aarch64-darwin\inffast.o}
//{$L .\aarch64-darwin\inffast_chunk.o}
{$L .\aarch64-darwin\inflate.o}
{$L .\aarch64-darwin\inftrees.o}
{$L .\aarch64-darwin\trees.o}
{$L .\aarch64-darwin\zutil.o}
{$ELSE}
{$L .\x86_64-darwin\adler32.o}
{$L .\x86_64-darwin\adler32_simd.o}
{$L .\x86_64-darwin\crc32.o}
{$L .\x86_64-darwin\crc32_simd.o}
{$L .\x86_64-darwin\deflate.o}
{$L .\x86_64-darwin\inffast.o}
{$L .\x86_64-darwin\inffast_chunk.o}
{$L .\x86_64-darwin\inflate.o}
{$L .\x86_64-darwin\inftrees.o}
{$L .\x86_64-darwin\trees.o}
{$L .\x86_64-darwin\zutil.o}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ifdef WIN64}
{$ifdef USEZLIBSSE}
{$L ..\static\x86_64-win64\sse\inffast.o}
(*{$L ..\static\x86_64-win64\sse\inffast.o}
{$L ..\static\x86_64-win64\sse\inftrees.o}
{$L ..\static\x86_64-win64\sse\inflate.o}
{$L ..\static\x86_64-win64\sse\deflate.o}
{$L ..\static\x86_64-win64\sse\trees.o}
{$L ..\static\x86_64-win64\sse\adler32.o}
{$L ..\static\x86_64-win64\sse\crc32.o}
{$L ..\static\x86_64-win64\sse\zutil.o}
{$L ..\static\x86_64-win64\sse\zutil.o} *)
{$L .\x86_64-win64\adler32_simd.o}
{$L .\x86_64-win64\crc32_simd.o}
{$L .\x86_64-win64\inffast_chunk.o}
{$L .\x86_64-win64\inffast.o}
{$L .\x86_64-win64\inftrees.o}
{$L .\x86_64-win64\inflate.o}
{$L .\x86_64-win64\deflate.o}
{$L .\x86_64-win64\trees.o}
{$L .\x86_64-win64\adler32.o}
{$L .\x86_64-win64\crc32.o}
{$L .\x86_64-win64\zutil.o}

{$else USEZLIBSSE}
{$L static\x86_64-win64\inffast.o}
{$L static\x86_64-win64\inftrees.o}
Expand Down
Loading

0 comments on commit 7f3702e

Please sign in to comment.