2602 Commits

Author SHA1 Message Date
Hans Kristian Rosbach
fd0d263ced [CI] Instead of selecting the most recent tag, select the highest version number. 2025-03-18 21:04:58 +01:00
Detlef Riekenberg
89f90d3e9c ports: Use memalign or _aligned_malloc, when available. Fallback to malloc
Using "_WIN32" to decide,
if the MSVC extensions _aligned_malloc / _aligned_free are available
is a bug that breaks other Compiler on Windows. (OpenWatcom as Example)

Regards ... Detlef
2025-03-17 16:36:12 +01:00
Eddy S.
5f1c7303ab fix the url of the s390x actions worker patch
gaplib changed their patch name scheme with 1a5e012.
2025-03-17 12:23:16 +01:00
Adam Stylinski
50e9ca06e2 Fold a copy into the adler32 function for UPDATEWINDOW for neon
So a lot of alterations had to be done to make this not worse and
so far, it's not really better, either. I had to force inlining for
the adler routine, I had to remove the x4 load instruction otherwise
pipelining stalled, and I had to use restrict pointers with a copy
idiom for GCC to inline a copy routine for the tail.

Still, we see a small benefit in benchmarks, particularly when done
with size of our window or larger. There's also an added benefit that
this will fix #1824.
2025-03-05 22:17:55 +01:00
Vladislav Shchapov
356a7976db Fix incorrect declaration of FORCE_SSE2
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2025-03-01 16:45:16 +01:00
Vladislav Shchapov
85223403d9 Change flags to "-Werror=unguarded-availability", "-Werror=unguarded-availability-new" and add it to maybe affected symbol checking
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2025-03-01 16:45:04 +01:00
Vladislav Shchapov
c3bd3d7645 Restore support macOS prior 10.15
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2025-03-01 16:45:04 +01:00
Hans Kristian Rosbach
9d4af458ea Make Chorba configurable,and add a few missing header files to CMake config.
Add CI run without chorba enabled.
2025-02-18 23:59:16 +01:00
Hans Kristian Rosbach
c1796e2145 Use OPTIMAL_CMP instead of BRAID_W to test for optimal size for Chorba. 2025-02-18 23:59:16 +01:00
Hans Kristian Rosbach
f411580733 Clean up internal crc32 function handling.
Mark crc32_c and crc32_braid functions as internal, and remove prefix.
Reorder contents of generic_functions, and remove Z_INTERNAL hints from declarations.
Add test/benchmark output to indicate whether Chorba is used.
2025-02-18 23:59:16 +01:00
Hans Kristian Rosbach
ed30965e29 Replace DO1/DO8 macros 2025-02-18 23:59:16 +01:00
Hans Kristian Rosbach
5fb2a1c493 Move Chorba defines 2025-02-18 23:59:16 +01:00
Hans Kristian Rosbach
8648ffef49 Clean up crc32_braid.
- Rename N and W to BRAID_N and BRAID_W
- Remove override capabilities for BRAID_N and BRAID_W
- Fix formatting in crc32_braid_tbl.h
- Make makecrct not rely on crc32_braid_p.h
2025-02-18 23:59:16 +01:00
Andrew Murray
e8d8049382 Added --installnamedir 2025-02-16 18:15:43 +01:00
Sam Russell
b33ba962c2 implement chorba algorithm 2025-02-15 14:31:50 +01:00
Cameron Cawley
aecfe160c5 Provide --without-acle/-DWITH_ACLE options for backward compatibility 2025-02-12 13:54:30 +01:00
Cameron Cawley
231c4b3a64 Use -Wa,-march with older ARM toolchains 2025-02-12 13:54:30 +01:00
Cameron Cawley
7ea78f12c8 Provide an inline asm fallback for the ARMv8 intrinsics 2025-02-12 13:54:30 +01:00
Cameron Cawley
721c488aff Rename most ACLE references to ARMv8 2025-02-12 13:54:30 +01:00
Hans Kristian Rosbach
860e4cff79 2.2.4 Release 2025-02-10 23:43:59 +01:00
Mika Lindqvist
43b2703435 Fix shift overflow in inflate and send_code. 2025-02-08 21:43:51 +01:00
Adam Stylinski
287c4dce22 Fix an unfortunate bug with Visual Studio 2015
Evidently this instruction, despite the intrinsic having a register operand,
is a memory-register instruction. There seems to be no alignment requirement
for the source operand. Because of this, compilers when not optimized are doing
the unaligned load and then dumping back to the stack to do the broadcasting load.
In doing this, MSVC seems to be dumping to the stack with an aligned move at an
unaligned address, causing a segfault.  GCC does not seem to make this mistake, as
it stashes to an aligned address.

If we're on Visual Studio 2015, let's just do the longer 9 cycle sequence of a 128
bit load followed by a vinserti128. This _should_ fix this (issue #1861).
2025-02-04 20:02:39 +01:00
Hans Kristian Rosbach
a3c0430afa Fix -Wmaybe-uninitialized warnings in benchmarks. 2025-02-01 12:41:22 +01:00
Hans Kristian Rosbach
057104f11a Add uncompress benchmark 2025-02-01 12:41:22 +01:00
Hans Kristian Rosbach
a0fa24710c s390x: Add workaround to install custom Clang 19.1.5 rpms to actions-runner
image in order to avoid the VX compiler bug in older clang versions.
2025-01-27 12:39:53 +01:00
Vladislav Shchapov
05305edee8 Remove unused include directories
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2025-01-27 12:38:30 +01:00
Vladislav Shchapov
69a60bfc18 Rename "arch/power/fallback_builtins.h" to avoid possible conflict with "fallback_builtins.h" in zlib-ng sources directory
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2025-01-27 12:38:30 +01:00
Mika Lindqvist
7701ce9f21 [abicheck] Regenerate ABI files for zlib
* Generate using Ubuntu 24.04.1 LTS to fix mismatch in function signatures of gzseek() and gztell()
2025-01-27 12:37:45 +01:00
Eduard Stefes
5e3510e314 Disable CRC32-VX Extention for some Clang versions
We have to disable the CRC32-VX implementation for some Clang versions
(18 <= version < 19.1.2) that generate bad code for the IBM S390 VGFMA intrinsics.
2025-01-25 17:25:17 +01:00
Vladislav Shchapov
8cebc9c6c9 Increase cmake workflow timeout
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2025-01-23 22:53:12 +01:00
Nathan Moinvaziri
608871e087 Use Ubuntu 20.04 for PPC64LE tests due to broken qemu. 2025-01-23 00:30:11 +01:00
Nathan Moinvaziri
62d52a5b90 Use Ubuntu 22.04 for AARCH64 tests
It seems that qemu might be failing. Tests on Raspberry Pi 5 with Ubuntu 24.04
appear to work just fine.
2025-01-23 00:30:11 +01:00
Nathan Moinvaziri
b7dc018caa Add missing compiler-rt libraries for Ubuntu 24. #1840 2025-01-23 00:30:11 +01:00
Nathan Moinvaziri
a95ee9e04b Ignore gcovr parser errors. 2025-01-23 00:30:11 +01:00
Nathan Moinvaziri
bdfe70070c Don't pin gcovr version any longer. #1840 2025-01-23 00:30:11 +01:00
Nathan Moinvaziri
2ffbbdba9c Use correct version of gcov for cross-compilers. 2025-01-23 00:30:11 +01:00
Nathan Moinvaziri
6286088e61 Use Ubuntu 24 crossbuild-essential packages. 2025-01-23 00:30:11 +01:00
Nathan Moinvaziri
fbba9cb705 Remove package qemu for Ubuntu 24. #1840 2025-01-23 00:30:11 +01:00
Nathan Moinvaziri
7077052292 Upgrade CI from Clang-11 to Clang 15 for Ubuntu 24. #1840 2025-01-23 00:30:11 +01:00
Hans Kristian Rosbach
212563db62 Improve image/container rebuild script to work properly under cron. 2025-01-19 16:53:46 +01:00
Dmitry Kurtaev
9064a25f11 Workaround error G6E97C40B
Warning as an error with GCC from Uubuntu 24.04:
```
/home/runner/work/dotnet_riscv/dotnet_riscv/runtime/src/native/external/zlib-ng/arch/riscv/riscv_features.c(25,33): error G6E97C40B: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] [/home/runner/work/dotnet_riscv/dotnet_riscv/runtime/src/native/libs/build-native.proj]
```
2025-01-19 16:11:15 +01:00
Sam James
6d24fb846f cmake: disable LTO for some configure checks
Some of zlib-ng's configure tests define a function expecting it to be compiled but
don't call that function, or don't use its return value. This is risky with
LTO where the whole thing may be optimised out, which has happened before:
* https://github.com/zlib-ng/zlib-ng/issues/1616
* https://github.com/zlib-ng/zlib-ng/pull/1622
* https://gitlab.kitware.com/cmake/cmake/-/issues/26103

Closes: https://github.com/zlib-ng/zlib-ng/issues/1841
2025-01-19 14:46:38 +01:00
Vladislav Shchapov
787c7f62ac Force use of latest Windows SDK with 32-bit ARM support for release workflows
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2025-01-02 18:38:51 +01:00
Hans Kristian Rosbach
cbb6ec1d74 2.2.3 Release 2025-01-01 01:22:18 +01:00
Hans Kristian Rosbach
bf05e882b8 Continued cleanup of old UNALIGNED_OK checks
- Remove obsolete checks
- Fix checks that are inconsistent
- Stop compiling compare256/longest_match variants that never gets called
- Improve how the generic compare256 functions are handled.
- Allow overriding OPTIMAL_CMP

This simplifies the code and avoids having a lot of code in the compiled library than can never get executed.
2024-12-26 22:14:46 +01:00
Hans Kristian Rosbach
1aeb2915a0 Rename functions to get rid of old and now misleading "unaligned" naming 2024-12-26 22:14:46 +01:00
Cameron Cawley
d7e121e56b Use GCC's may_alias attribute for unaligned memory access 2024-12-24 12:55:44 +01:00
Cameron Cawley
fc90e7b3fc Improved setting of OPTIMAL_CMP on ARM 2024-12-23 14:07:06 +01:00
Adam Stylinski
06bba67470 Fix unaligned access in ACLE based crc32
This fixes a rightful complaint from the alignment sanitizer that we
alias memory in an unaligned fashion. A nice added bonus is that this
improves performance a tiny bit on the larger buffers, perhaps due to
loops that idiomatically decrement a count and increment a single buffer
pointer rather than the maze of conditional pointer reassignments.

While here, let's write a unit test just for this. Since this is the only
variant that accesses memory in a potentially unaligned fashion that doesn't
explicitly go byte by byte or use intrinsics that don't require alignment,
we'll enable it only for this function for now. Adding more tests later if
need be should be possible. For everything else not crc, we're relying on
ubsan to hopefully catch things by chance.
2024-12-23 14:06:35 +01:00
Hans Kristian Rosbach
87d8e95408 Update s390x actions-runner docker 2024-12-22 15:41:08 +01:00