]> git.ipfire.org Git - thirdparty/zlib-ng.git/log
thirdparty/zlib-ng.git
2 years agoOptimize adler32 using rvv
alexsifivetw [Sat, 1 Jul 2023 17:40:06 +0000 (10:40 -0700)] 
Optimize adler32 using rvv

2 years agoHandle ARM64EC as ARM64.
David Korth [Sat, 15 Jul 2023 14:13:20 +0000 (10:13 -0400)] 
Handle ARM64EC as ARM64.

ARM64EC is a new ARM64 variant introduced in Windows 11 that uses an
ABI similar to AMD64, which allows for better interoperability with
emulated AMD64 applications. When enabled in MSVC, it defines _M_AMD64
and _M_ARM64EC, but not _M_ARM64, so we need to check for _M_ARM64EC.

2 years agoInitial loongarch port
Leslie Zhai [Thu, 13 Jul 2023 11:39:22 +0000 (19:39 +0800)] 
Initial loongarch port

2 years agoDefine an empty __msan_unpoison() without Z_MEMORY_SANITIZER
Ilya Leoshkevich [Thu, 6 Jul 2023 11:49:58 +0000 (13:49 +0200)] 
Define an empty __msan_unpoison() without Z_MEMORY_SANITIZER

Currently all the usages of __msan_unpoison() have to be guarded by
"#ifdef Z_MEMORY_SANITIZER". Simplify things by defining an empty
__msan_unpoison() when the code is compiled without MSan.

2 years agoFix distclean target in Makefile.in
Mika Lindqvist [Sat, 1 Jul 2023 11:52:22 +0000 (14:52 +0300)] 
Fix distclean target in Makefile.in

2 years ago2.1.3 Release 2.1.3
Hans Kristian Rosbach [Wed, 28 Jun 2023 15:49:17 +0000 (17:49 +0200)] 
2.1.3 Release

2 years agoAllow re-enabling @rpath on OS/X when using relative install prefix
Mika Lindqvist [Fri, 23 Jun 2023 01:32:58 +0000 (04:32 +0300)] 
Allow re-enabling @rpath on OS/X when using relative install prefix

2 years ago[ARM] Check that we have features.h before detecting float-abi
Mika Lindqvist [Tue, 27 Jun 2023 15:52:12 +0000 (18:52 +0300)] 
[ARM] Check that we have features.h before detecting float-abi
* MacOS/arm64 is known to not have features.h

2 years agoHandle complete overlap in chunkcopy_safe
Fabian Vogt [Tue, 27 Jun 2023 07:47:04 +0000 (09:47 +0200)] 
Handle complete overlap in chunkcopy_safe

Fixes #1525

2 years agoOptimize slide_hash using RVV
alexsifivetw [Mon, 19 Jun 2023 10:05:11 +0000 (03:05 -0700)] 
Optimize slide_hash using RVV

2 years agoUpdate detect-arch.cmake
Andrea Campanella [Fri, 16 Jun 2023 11:50:28 +0000 (12:50 +0100)] 
Update detect-arch.cmake

Add Cortex plaform for ARM

2 years agoUse endianess-specific built-in function for gcc < 12 on PowerPC64
Mika T. Lindqvist [Sun, 11 Jun 2023 22:18:12 +0000 (01:18 +0300)] 
Use endianess-specific built-in function for gcc < 12 on PowerPC64
* Add support for cross-compiling using clang 13 and later for PowerPC64 little-endian and big-endian
* Fix detection for availability of Power9 intrinsics

2 years agoMinor code cleanup in deflate.c.
Nathan Moinvaziri [Sun, 21 May 2023 02:52:21 +0000 (19:52 -0700)] 
Minor code cleanup in deflate.c.

2 years agoOptimize compare256 with rvv
alexsifivetw [Tue, 16 May 2023 10:01:37 +0000 (03:01 -0700)] 
Optimize compare256 with rvv

2 years agoTry to find system copy of googletest before trying to download it.
Mika T. Lindqvist [Sun, 11 Jun 2023 15:38:12 +0000 (18:38 +0300)] 
Try to find system copy of googletest before trying to download it.
* Don't use system copy if memory sanitizer is enabled

2 years agoFix for PowerPC64 little-endian.
Mika Lindqvist [Fri, 9 Jun 2023 19:03:18 +0000 (22:03 +0300)] 
Fix for PowerPC64 little-endian.

2 years agoAdd support for cross-compiling for Power9.
Mika Lindqvist [Fri, 9 Jun 2023 14:54:15 +0000 (17:54 +0300)] 
Add support for cross-compiling for Power9.

2 years ago2.1.2 Release 2.1.2
Hans Kristian Rosbach [Wed, 7 Jun 2023 18:08:08 +0000 (20:08 +0200)] 
2.1.2 Release

2 years agoRemove COMMAND_ECHO statements only available in CMake 3.15. #1511
Nathan Moinvaziri [Sun, 4 Jun 2023 19:39:42 +0000 (12:39 -0700)] 
Remove COMMAND_ECHO statements only available in CMake 3.15. #1511

Instead use -DCMAKE_EXECUTE_PROCESS_COMMAND_ECHO=ON.

2 years agoUpdate Package Check CI workflow.
Mika Lindqvist [Fri, 2 Jun 2023 00:07:27 +0000 (03:07 +0300)] 
Update Package Check CI workflow.

2 years agoAdd ABI files for MIPS/MIPS64.
Mika Lindqvist [Thu, 1 Jun 2023 23:50:10 +0000 (02:50 +0300)] 
Add ABI files for MIPS/MIPS64.

2 years agoNo indentation allowed for error function in test/Makefile.in
Mika Lindqvist [Thu, 1 Jun 2023 22:59:13 +0000 (01:59 +0300)] 
No indentation allowed for error function in test/Makefile.in

2 years agodistclean target in test directory should depend on clean target.
Mika Lindqvist [Thu, 1 Jun 2023 09:09:56 +0000 (12:09 +0300)] 
distclean target in test directory should depend on clean target.

2 years agoAdd MIPS64 to GitHub workflows.
Mika Lindqvist [Wed, 31 May 2023 07:19:05 +0000 (10:19 +0300)] 
Add MIPS64 to GitHub workflows.

2 years agodistclean target should depend on clean target in arch directories.
Mika Lindqvist [Thu, 1 Jun 2023 06:22:24 +0000 (09:22 +0300)] 
distclean target should depend on clean target in arch directories.

2 years agoAdd MIPS to GitHub workflows.
Mika Lindqvist [Wed, 31 May 2023 06:37:23 +0000 (09:37 +0300)] 
Add MIPS to GitHub workflows.

2 years agoMake sure file exists before adding it as dependency in configure.
Mika Lindqvist [Wed, 31 May 2023 04:30:57 +0000 (07:30 +0300)] 
Make sure file exists before adding it as dependency in configure.

2 years agoAdd distclean target to arch/generic/Makefile.in
Mika Lindqvist [Wed, 31 May 2023 03:07:10 +0000 (06:07 +0300)] 
Add distclean target to arch/generic/Makefile.in

2 years ago2.1.1-Beta2 2.1.1-beta2
Hans Kristian Rosbach [Tue, 16 May 2023 11:40:27 +0000 (13:40 +0200)] 
2.1.1-Beta2

Changes since 2.1.0-Beta1:
- Fix missing exported z_size_t type in zlib.h (zlib-compat mode).
- Fix two Coverity warnings
- Fix CMake GNUInstallDirs usage
- Configure/CMake improvements for compilers with early AVX512-VNNI support (GCC8.0 etc)
- Microptimalization for AVX512 implementation of CRC32
- Optimized deflate_rle compression, also added related test and benchmark.
- Add testing of file_compress/file_uncompress in minigzip/minideflate
- Add emulated RISC-V to CI test workflow
- Add deflate_fast to switchlevels test
- Fix abicheck CI test was not ignoring version string
- Fix MinGW CI test, broken by Github Actions VM image updates

2 years agoMove defining z_size_t to below including stddef.h and unistd.h in zconf.h.
Mika T. Lindqvist [Tue, 16 May 2023 16:40:01 +0000 (19:40 +0300)] 
Move defining z_size_t to below including stddef.h and unistd.h in zconf.h.

2 years agoRemove refrences to z_size_t from zlib-ng.h, since we use size_t directly.
Hans Kristian Rosbach [Mon, 15 May 2023 13:48:11 +0000 (15:48 +0200)] 
Remove refrences to z_size_t from zlib-ng.h, since we use size_t directly.

2 years agoFix z_size_t definition:
Hans Kristian Rosbach [Sun, 14 May 2023 20:02:25 +0000 (22:02 +0200)] 
Fix z_size_t definition:
- Zlib Compat: Move definition of z_size_t to zconf.h, so it is exported to applications.
               Always defined as size_t to follow zlib 1.2.13 behavior with STDC compilers.
- Zlib-NG: Keeps internal definition of z_size_t in zbuild.h

2 years agoAdd tests of file_compress/file_uncompress in minigzip and minideflate.
Hans Kristian Rosbach [Fri, 12 May 2023 23:54:25 +0000 (01:54 +0200)] 
Add tests of file_compress/file_uncompress in minigzip and minideflate.

2 years agoAdded benchmark for compare256_rle family of functions.
Nathan Moinvaziri [Sun, 5 Feb 2023 18:30:18 +0000 (10:30 -0800)] 
Added benchmark for compare256_rle family of functions.

2 years agoAdded unit tests for compare256_rle family of functions.
Nathan Moinvaziri [Fri, 18 Mar 2022 22:49:54 +0000 (15:49 -0700)] 
Added unit tests for compare256_rle family of functions.

2 years agoAdded support for unaligned/intrinsic to deflate_rle.
Nathan Moinvaziri [Sun, 5 Feb 2023 18:30:18 +0000 (10:30 -0800)] 
Added support for unaligned/intrinsic to deflate_rle.

2 years agoMake an AVX512 status message more clear
Hans Kristian Rosbach [Mon, 15 May 2023 14:22:25 +0000 (16:22 +0200)] 
Make an AVX512 status message more clear

2 years agoFix MinGW CI.
Mika T. Lindqvist [Sat, 13 May 2023 20:15:28 +0000 (23:15 +0300)] 
Fix MinGW CI.

2 years agoFix the same AVX512 error in CMake.
Hans Kristian Rosbach [Sat, 13 May 2023 20:57:47 +0000 (22:57 +0200)] 
Fix the same AVX512 error in CMake.

2 years agoFix error in previous commit breaking AVX512.
Hans Kristian Rosbach [Sat, 13 May 2023 19:16:32 +0000 (21:16 +0200)] 
Fix error in previous commit breaking AVX512.

2 years agoUpdate README.md
Hans Kristian Rosbach [Fri, 12 May 2023 21:04:35 +0000 (23:04 +0200)] 
Update README.md

2 years agoFix AVX512-VNNI compile flags.
Hans Kristian Rosbach [Sat, 13 May 2023 11:17:04 +0000 (13:17 +0200)] 
Fix AVX512-VNNI compile flags.

2 years agoFix abicheck no longer ignoring version string after previous variable rename.
Hans Kristian Rosbach [Fri, 12 May 2023 20:27:53 +0000 (22:27 +0200)] 
Fix abicheck no longer ignoring version string after previous variable rename.

2 years agoAdd supporting RISC-V cross compilation workflows
Alex Chiang [Thu, 27 Apr 2023 08:40:15 +0000 (01:40 -0700)] 
Add supporting RISC-V cross compilation workflows
Add RISC-V cross-compilation test
Enable RVV support at compile time

2 years agoUse ternary logic to xor 3 operands for "fold16"
Adam Stylinski [Sat, 29 Apr 2023 15:33:05 +0000 (11:33 -0400)] 
Use ternary logic to xor 3 operands for "fold16"

This strategy is borrowed from ISA-L in this commit:
https://github.com/intel/isa-l/commit/c2bec3ea65ce35b01311d1cc4b314f6b4986b9c8

We can also use it in the "fold final" routine but we'd have to take
some extra care to only use it on AVX512 capable systems.

2 years agoFix out-of-bound access of zng_length_codes.
Mika Lindqvist [Tue, 25 Apr 2023 23:19:50 +0000 (02:19 +0300)] 
Fix out-of-bound access of zng_length_codes.

2 years agoInclude GNUInstallDirs earlier
Harmen Stoppels [Tue, 2 May 2023 08:36:16 +0000 (10:36 +0200)] 
Include GNUInstallDirs earlier

for pkg config dir

2 years agoRemove CMAKE_MACOSX_RPATH
Harmen Stoppels [Tue, 2 May 2023 08:12:15 +0000 (10:12 +0200)] 
Remove CMAKE_MACOSX_RPATH

This is ON by default since CMake 3.0

2 years ago2.1.0 Beta1 release 2.1.0-beta1
Hans Kristian Rosbach [Tue, 25 Apr 2023 10:37:32 +0000 (12:37 +0200)] 
2.1.0 Beta1 release

This release contains two years of development and improvements to zlib-ng,
as well as fixes and changes inherited from zlib.

The 2.1.x version series has new targeted minumum buildsystem versions, as detailed on the Wiki https://github.com/zlib-ng/zlib-ng/wiki

Buildsystem:
- Many improvements to the CMake scripts.
- Improved support for detecting memory alignment functions.
- Improved support for unaligned access by letting the compiler promote code to unaligned if supported by the CPU.
- Remove x86 cpu feature detection for TZCNT, safely fallback to BSF.
- Enable using AVX512 intrinsics with GCC <9.

Optimizations and Enhancements:
- Decompression is a lot faster (56% faster measured on AVX2-capable x86-64)
- Compresson is improved for Level 9, at the cost of a little performance.
- Compression is improved for Level 3, by switching from deflate_fast to deflate_medium.
- Levels 3 and 4 have been reconfigured to provide a better gradual tradeoff for speed/compression between levels 2 and 5.
- Deflate_quick (Level 1) has been improved to default to a bigger windowsize and support changing the window size like the other levels.

New instruction set optimizations:
- Adler32 implementation using AVX512, AVX512-VNNI, VMX.
- CRC32-B implementation using VPCLMULQDQ & IBM-Z.
- Slide hash implementation using VMX.
- Compare256 implementations using SSE2, Neon, & POWER9.
- Inflate chunk copying using SSSE3 & VSX.

Compatibility and Porting:
- CRC-32 computation changes from madler/zlib. zlib-ng/zlib-ng#a6155234
- Compatible and up-to-date with zlib 1.2.13.
- Removed the usage of macros in zlib-ng.h, making life easier for languages that want to call the C functions without having the C preprocessor (Python, etc).

Improved support more environments:
- Apple M1
- vcpkg
- Emscripten

Testing:
- Tests have been converted to use GTest. Many new tests have also been added.
- Gbench support has been added to easily benchmark changes to performance-critical functions.

Misc:
- Several pieces of core code has been restructured or rewritten.
- Too many changes to list here, see the git commit log for the full list of changes.

Deprecations:
- Configure no longer has the full range of tests.
- NMake is no longer actively supported and tested, it is now community supported.
- See the wiki for minimum build system versions and deprecations https://github.com/zlib-ng/zlib-ng/wiki

2 years agoFix potential overflow before widening in makecrtc.
Mika Lindqvist [Wed, 26 Apr 2023 16:28:43 +0000 (19:28 +0300)] 
Fix potential overflow before widening in makecrtc.

2 years agoFix use after free in test_deflate_bound.
Mika Lindqvist [Tue, 25 Apr 2023 23:18:24 +0000 (02:18 +0300)] 
Fix use after free in test_deflate_bound.

2 years agoAssure that inflatePrime() can't shift a 32-bit integer by 32 bits.
Mark Adler [Fri, 17 Feb 2023 08:06:32 +0000 (00:06 -0800)] 
Assure that inflatePrime() can't shift a 32-bit integer by 32 bits.

The inflate() functions never leave state->bits greater than 24, so
an inflatePrime() call could not cause this. The only way this
could have happened would be by using inflatePrime() to fill the
bit buffer with 32 bits, and then calling inflatePrime() a *second*
time asking to insert zero bits, for some reason. This commit
assures that a shift by 32 bits does not occur even in that case.

2 years agoUse ZLIB_INCLUDE_DIRS from FindZLIB instead of ZLIB_INCLUDE_DIR.
Nathan Moinvaziri [Mon, 24 Apr 2023 16:04:24 +0000 (09:04 -0700)] 
Use ZLIB_INCLUDE_DIRS from FindZLIB instead of ZLIB_INCLUDE_DIR.

ZLIB_INCLUDE_DIRS is set by FindZLIB if ZLIB_INCLUDE_DIR is set on the
command line.

2 years agoEnsure that unaligned compare256 variants are only used on little endian systems
Cameron Cawley [Sat, 15 Apr 2023 18:08:05 +0000 (19:08 +0100)] 
Ensure that unaligned compare256 variants are only used on little endian systems

2 years agoIBM zSystems: Fix calling deflateBound() before deflateInit()
Ilya Leoshkevich [Wed, 19 Apr 2023 14:03:18 +0000 (16:03 +0200)] 
IBM zSystems: Fix calling deflateBound() before deflateInit()

Even though zlib officialy forbids calling deflateBound() before
deflateInit(), Firefox does this anyway, and it happens to work [1],
but unfortunately not with DFLTCC [2], because the DFLTCC code assumes
that the deflate state is allocated, and segfaults when it isn't.

Bow down before Hyrum's Law and add deflateStateCheck() to
DEFLATE_BOUND_ADJUST_COMPLEN().

Extend the deflate_bound test accordingly.

[1] https://searchfox.org/mozilla-esr102/source/dom/script/ScriptCompression.cpp#97
[2] https://bugzilla.suse.com/show_bug.cgi?id=1210593

2 years agoRename chunkset_avx to chunkset_avx2
Cameron Cawley [Sat, 15 Apr 2023 18:40:54 +0000 (19:40 +0100)] 
Rename chunkset_avx to chunkset_avx2

2 years agoFix compilation on OpenBSD
Benjamin Stürz [Sun, 9 Apr 2023 16:02:04 +0000 (18:02 +0200)] 
Fix compilation on OpenBSD

Non-POSIX functions (like vasprintf() and swap16()) require
_BSD_SOURCE to be defined.

Signed-off-by: Benjamin Stürz <benni@stuerz.xyz>
2 years agoFix CMake check for posix_memalign and aligned_alloc
lawadr [Tue, 4 Apr 2023 13:53:35 +0000 (14:53 +0100)] 
Fix CMake check for posix_memalign and aligned_alloc

These two functions were being checked using check_function_exists. This
CMake macro does not check to see if the given function is declared in
any header as it declares its own function prototype and relies on
linking to determine function availability. This causes two issues.

Firstly, it will always succeed when the CMake toolchain file sets
CMAKE_TRY_COMPILE_TARGET_TYPE to STATIC_LIBRARY as no linking will take
place. See: https://gitlab.kitware.com/cmake/cmake/-/issues/18121

Secondly, it will not correctly detect macros or inline functions, or
whether the function is even declared in a header at all.

Switch to check_symbol_exists at CMake's recommendation, the logic of
which actually matches the same checks in the configure script.

2 years agoReverted description with Deprecation notice
Vladislav Shchapov [Thu, 13 Apr 2023 14:18:03 +0000 (19:18 +0500)] 
Reverted description with Deprecation notice

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2 years agoFix .pc file paths
Vladislav Shchapov [Sat, 18 Mar 2023 09:43:37 +0000 (14:43 +0500)] 
Fix .pc file paths

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2 years agoSwitch to the standard CMake module GNUInstallDirs
Vladislav Shchapov [Fri, 17 Mar 2023 18:27:38 +0000 (23:27 +0500)] 
Switch to the standard CMake module GNUInstallDirs

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2 years agoClean up SSE4.2 detection
Cameron Cawley [Tue, 28 Mar 2023 21:05:20 +0000 (22:05 +0100)] 
Clean up SSE4.2 detection

2 years agoCheck for attribute aligned compiler support
lawadr [Thu, 30 Mar 2023 19:37:14 +0000 (20:37 +0100)] 
Check for attribute aligned compiler support

Check for compiler support in CMake and the configure script. This
allows ALIGNED_ to be defined for more compilers so that more than
just Clang, GCC and MSVC can build the project.

2 years agoRemove architecture dependent endian header locations
lawadr [Thu, 30 Mar 2023 15:29:38 +0000 (16:29 +0100)] 
Remove architecture dependent endian header locations

The header locations are OS specific and not architecture specific. The
previous behaviour was to always include machine/endian.h for ARM and
AArch64 architectures on non-Windows and non-Linux OSs, causing build
failures if the OS uses other locations defined further down the
conditional block.

2 years agoEnable use of _mm_shuffle_epi8 on machines without SSE4.1
Cameron Cawley [Tue, 28 Mar 2023 18:01:44 +0000 (19:01 +0100)] 
Enable use of _mm_shuffle_epi8 on machines without SSE4.1

2 years agoShared libraries on cygwin can be named with their version number
Daisuke Fujimura (fd0) [Thu, 9 Mar 2023 13:16:13 +0000 (22:16 +0900)] 
Shared libraries on cygwin can be named with their version number

2 years agoEnable using AVX512 intrinsics with GCC <9
Georgiy Manuilov [Sun, 12 Mar 2023 13:45:53 +0000 (14:45 +0100)] 
Enable using AVX512 intrinsics with GCC <9

Replace missing '_mm512_set_epi8' with
'_mm512_set_epi32' in test code for configuring;
Add fallback for '-mtune=cascadelake' flag used
when AVX512 is enabled.

2 years agoAdd fallback function for '_mm512_set_epi8' intrinsic
Georgiy Manuilov [Sun, 12 Mar 2023 13:45:05 +0000 (14:45 +0100)] 
Add fallback function for '_mm512_set_epi8' intrinsic

'_mm512_set_epi8' intrinsic is missing in GCC <9.
However, its usage can be easily eliminated in
favor of '_mm512_set_epi32' with no loss in
performance enabling older GCC to benefit from
AVX512-optimized codepaths.

2 years agoRemove unused PREFETCH macros
Cameron Cawley [Fri, 24 Mar 2023 22:55:41 +0000 (22:55 +0000)] 
Remove unused PREFETCH macros

2 years agoAdd member to cpu_features struct if empty
lawadr [Mon, 20 Mar 2023 17:46:35 +0000 (17:46 +0000)] 
Add member to cpu_features struct if empty

When WITH_OPTIM is off, the cpu_features struct is empty. This is not
allowed in standard C and causes a build failure with various compilers,
including MSVC.

This adds a dummy char member to the struct if it would otherwise be
empty.

2 years agoFix regex for visibility attribute tests
lawadr [Fri, 17 Mar 2023 16:35:13 +0000 (16:35 +0000)] 
Fix regex for visibility attribute tests

The previous regex of `not supported` was very specific to a particular
compiler (Clang 3.4+). As Clang isn't the only compiler that throws a
warning (but otherwise succeeds) when a visibility isn't supported, make
the regex more generic to hit all such cases.

Testing on Compiler Explorer shows that looking for the string
`visibility` has a better hit rate. `attribute` is perhaps more
dangerously generic, and `hidden`/`internal` doesn't always show up in
warning messages when the visibility attribute itself isn't available.

2 years agoCreate FUNDING.yml
Hans Kristian Rosbach [Sat, 18 Mar 2023 23:36:55 +0000 (00:36 +0100)] 
Create FUNDING.yml

Adds the required file for enabling the `Sponsor` button to appear when viewing the repo.

2 years agoIBM zSystems: Use HWCAP_S390_VXRS
Ilya Leoshkevich [Mon, 6 Mar 2023 22:25:04 +0000 (23:25 +0100)] 
IBM zSystems: Use HWCAP_S390_VXRS

glibc defines HWCAP_S390_VX and, since v2.33, its alias
HWCAP_S390_VXRS; musl has only HWCAP_S390_VXRS.

Use the common HWCAP_S390_VXRS, define it as HWCAP_S390_VX if
necessary.

2 years agoRemove useless assignments
Vladislav Shchapov [Sat, 18 Feb 2023 22:01:07 +0000 (03:01 +0500)] 
Remove useless assignments

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2 years agoReplace global CPU feature flag variables with local variable in init_functable
Vladislav Shchapov [Sat, 18 Feb 2023 16:25:55 +0000 (21:25 +0500)] 
Replace global CPU feature flag variables with local variable in init_functable

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2 years agoReplace __WIN__ with X86_FEATURES
Vladislav Shchapov [Thu, 23 Feb 2023 18:22:35 +0000 (23:22 +0500)] 
Replace __WIN__ with X86_FEATURES

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2 years agoFix TEST_CRC32 macro
Vladislav Shchapov [Sat, 18 Feb 2023 12:58:36 +0000 (17:58 +0500)] 
Fix TEST_CRC32 macro

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2 years agoAdd missing test for crc32_vpclmulqdq
Vladislav Shchapov [Sat, 18 Feb 2023 12:46:40 +0000 (17:46 +0500)] 
Add missing test for crc32_vpclmulqdq

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2 years agoFix CodeQL warnings: This pointer might have type (size 4), but this pointer arithme...
Vladislav Shchapov [Sat, 18 Feb 2023 09:30:13 +0000 (14:30 +0500)] 
Fix CodeQL warnings: This pointer might have type  (size 4), but this pointer arithmetic is done with type __m128i * (size 16)

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2 years agoFix formatting
Vladislav Shchapov [Sat, 18 Feb 2023 09:18:18 +0000 (14:18 +0500)] 
Fix formatting

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2 years agoSplit crc32 pclmulqdq and vpclmulqdq implementations
Vladislav Shchapov [Fri, 17 Feb 2023 16:41:46 +0000 (21:41 +0500)] 
Split crc32 pclmulqdq and vpclmulqdq implementations

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2 years agoInflate: add fast-path for literals
Dougall Johnson [Mon, 22 Aug 2022 01:44:41 +0000 (11:44 +1000)] 
Inflate: add fast-path for literals

2 years agoInflate: refill unconditionally
Dougall Johnson [Mon, 22 Aug 2022 01:39:35 +0000 (11:39 +1000)] 
Inflate: refill unconditionally

2 years agoFix definition of z_size_t to match documentation of legacy zlib API.
Mika T. Lindqvist [Wed, 7 Dec 2022 19:48:31 +0000 (21:48 +0200)] 
Fix definition of z_size_t to match documentation of legacy zlib API.

2 years agoFix warning: comparison of integer expressions of different signedness: 'size_t'...
Vladislav Shchapov [Fri, 17 Feb 2023 19:02:49 +0000 (00:02 +0500)] 
Fix warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2 years agoUse named defines instead of hard coded numbers.
Nathan Moinvaziri [Sun, 12 Feb 2023 01:24:54 +0000 (17:24 -0800)] 
Use named defines instead of hard coded numbers.

2 years agoSort functable alphabetically
Hans Kristian Rosbach [Wed, 8 Feb 2023 21:53:36 +0000 (22:53 +0100)] 
Sort functable alphabetically

2 years agoFix CMake not enabling POWER9_FEATURES
Hans Kristian Rosbach [Tue, 7 Feb 2023 15:03:46 +0000 (16:03 +0100)] 
Fix CMake not enabling POWER9_FEATURES

2 years agoReduce the amount of different defines required for arch-specific optimizations.
Hans Kristian Rosbach [Mon, 6 Feb 2023 13:41:32 +0000 (14:41 +0100)] 
Reduce the amount of different defines required for arch-specific optimizations.
Also removed a reference to a nonexistant adler32_sse41 in test/test_adler32.cc.

2 years agoAdd missing compare256_neon activation to functable
Hans Kristian Rosbach [Mon, 6 Feb 2023 19:05:33 +0000 (20:05 +0100)] 
Add missing compare256_neon activation to functable

2 years agoCombine some of the checks that were not identical.
Hans Kristian Rosbach [Mon, 6 Feb 2023 11:40:13 +0000 (12:40 +0100)] 
Combine some of the checks that were not identical.
Made longest_match and compare256 use the X86_NOCHECK_SSE2 override,
thus now those are also automatically enabled on x86_64.

2 years agoSimplify functable.c
Hans Kristian Rosbach [Mon, 6 Feb 2023 11:29:41 +0000 (12:29 +0100)] 
Simplify functable.c

2 years agoNarrow down the amount of packages installed for Wine.
Hans Kristian Rosbach [Thu, 9 Feb 2023 11:04:09 +0000 (12:04 +0100)] 
Narrow down the amount of packages installed for Wine.

2 years ago[minigzip] Close gzFile before exiting on error.
Mika T. Lindqvist [Fri, 10 Feb 2023 10:06:59 +0000 (12:06 +0200)] 
[minigzip] Close gzFile before exiting on error.

2 years agoFix warnings in benchmarks
Ilya Leoshkevich [Fri, 10 Feb 2023 12:41:07 +0000 (13:41 +0100)] 
Fix warnings in benchmarks

1. Initialize len in benchmark_compare256.cc.

    In function ‘typename std::enable_if<(std::is_trivially_copyable<_Tp>::value && (sizeof (Tp) <= sizeof (Tp*)))>::type benchmark::DoNotOptimize(Tp&) [with Tp = unsigned int]’,
        inlined from ‘void compare256::Bench(benchmark::State&, compare256_func)’ at /zlib-ng/test/benchmarks/benchmark_compare256.cc:44:33,
        inlined from ‘virtual void compare256_c_Benchmark::BenchmarkCase(benchmark::State&)’ at /zlib-ng/test/benchmarks/benchmark_compare256.cc:62:1:
    /zlib-ng/_deps/benchmark-src/include/benchmark/benchmark.h:480:3: warning: ‘len’ may be used uninitialized [-Wmaybe-uninitialized]
      480 |   asm volatile("" : "+m,r"(value) : : "memory");
          |   ^~~
    /zlib-ng/test/benchmarks/benchmark_compare256.cc: In member function ‘virtual void compare256_c_Benchmark::BenchmarkCase(benchmark::State&)’:
    /zlib-ng/test/benchmarks/benchmark_compare256.cc:36:18: note: ‘len’ was declared here
       36 |         uint32_t len;
          |                  ^~~

2. Make the loop counter unsigned in benchmark_slidehash.cc.

    /zlib-ng/test/benchmarks/benchmark_slidehash.cc: In member function ‘virtual void slide_hash::SetUp(const benchmark::State&)’:
    /zlib-ng/test/benchmarks/benchmark_slidehash.cc:29:31: warning: comparison of integer expressions of different signedness: ‘int32_t’ {aka ‘int’} and ‘unsigned int’ [-Wsign-compare]
       29 |         for (int32_t i = 0; i < HASH_SIZE; i++) {

2 years agoUpdate zlib-ng ABI files.
Mika Lindqvist [Mon, 6 Feb 2023 03:50:05 +0000 (05:50 +0200)] 
Update zlib-ng ABI files.

2 years agoAdjust thread counts for compiles and tests to avoid under-utilization and congestion.
Hans Kristian Rosbach [Thu, 9 Feb 2023 00:51:09 +0000 (01:51 +0100)] 
Adjust thread counts for compiles and tests to avoid under-utilization and congestion.
The free Github Actions VMs have 2 cores, the dedicated s390x VM has 4 cores.

2 years agoFix various incorrect name mangling
Hans Kristian Rosbach [Tue, 7 Feb 2023 12:57:56 +0000 (13:57 +0100)] 
Fix various incorrect name mangling

2 years agoFix wrong names and invalid entries in zlib.map and zlib-ng.map
Hans Kristian Rosbach [Tue, 7 Feb 2023 09:17:27 +0000 (10:17 +0100)] 
Fix wrong names and invalid entries in zlib.map and zlib-ng.map

2 years agoFix prefixing for internal functions calloc/cfree
Hans Kristian Rosbach [Tue, 7 Feb 2023 09:05:19 +0000 (10:05 +0100)] 
Fix prefixing for internal functions calloc/cfree