Skip to content

Ensure that unaligned compare256 variants are only used on little endian systems#1469

Merged
Dead2 merged 1 commit intozlib-ng:developfrom
ccawley2011:unaligned-big-endian
Apr 25, 2023
Merged

Ensure that unaligned compare256 variants are only used on little endian systems#1469
Dead2 merged 1 commit intozlib-ng:developfrom
ccawley2011:unaligned-big-endian

Conversation

@ccawley2011
Copy link
Copy Markdown
Contributor

With this change it should be possible to enable UNALIGNED_OK on big endian PowerPC targets, although I've only been able to test this with QEMU.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 15, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.02 ⚠️

Comparison is base (e24334f) 83.15% compared to head (0495ae7) 83.13%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1469      +/-   ##
===========================================
- Coverage    83.15%   83.13%   -0.02%     
===========================================
  Files          130      130              
  Lines        10759    10759              
  Branches      2760     2760              
===========================================
- Hits          8947     8945       -2     
- Misses        1137     1139       +2     
  Partials       675      675              
Flag Coverage Δ
macos_clang 42.97% <ø> (ø)
macos_gcc 72.97% <ø> (ø)
ubuntu_clang 82.25% <ø> (ø)
ubuntu_clang_debug 81.92% <ø> (ø)
ubuntu_clang_inflate_allow_invalid_dist 81.91% <ø> (ø)
ubuntu_clang_inflate_strict 82.24% <ø> (ø)
ubuntu_clang_mmap 82.57% <ø> (+0.22%) ⬆️
ubuntu_clang_pigz 14.15% <ø> (ø)
ubuntu_clang_pigz_no_optim 11.56% <ø> (ø)
ubuntu_clang_pigz_no_threads 13.97% <ø> (ø)
ubuntu_clang_reduced_mem 82.74% <ø> (ø)
ubuntu_gcc 74.42% <ø> (-0.08%) ⬇️
ubuntu_gcc_aarch64 76.66% <ø> (ø)
ubuntu_gcc_aarch64_compat_no_opt 75.01% <ø> (ø)
ubuntu_gcc_aarch64_no_acle 75.56% <ø> (ø)
ubuntu_gcc_aarch64_no_neon 75.55% <ø> (ø)
ubuntu_gcc_armhf 76.74% <ø> (ø)
ubuntu_gcc_armhf_compat_no_opt 74.97% <ø> (ø)
ubuntu_gcc_armhf_no_acle 76.69% <ø> (ø)
ubuntu_gcc_armhf_no_neon 76.57% <ø> (ø)
ubuntu_gcc_armsf 74.04% <ø> (ø)
ubuntu_gcc_armsf_compat_no_opt 73.52% <ø> (+0.01%) ⬆️
ubuntu_gcc_benchmark 73.17% <ø> (ø)
ubuntu_gcc_compat_no_opt 76.08% <ø> (+0.01%) ⬆️
ubuntu_gcc_compat_sprefix 73.03% <ø> (ø)
ubuntu_gcc_m32 72.68% <ø> (ø)
ubuntu_gcc_mingw_i686 72.92% <ø> (ø)
ubuntu_gcc_mingw_x86_64 72.92% <ø> (ø)
ubuntu_gcc_no_avx2 73.65% <ø> (ø)
ubuntu_gcc_no_ctz 74.09% <ø> (ø)
ubuntu_gcc_no_ctzll 74.11% <ø> (ø)
ubuntu_gcc_no_pclmulqdq 73.65% <ø> (+0.06%) ⬆️
ubuntu_gcc_no_sse2 73.81% <ø> (-0.06%) ⬇️
ubuntu_gcc_no_sse42 73.59% <ø> (ø)
ubuntu_gcc_o1 73.49% <ø> (ø)
ubuntu_gcc_osb ∅ <ø> (∅)
ubuntu_gcc_pigz 38.34% <ø> (ø)
ubuntu_gcc_pigz_aarch64 39.20% <ø> (ø)
ubuntu_gcc_ppc 73.32% <ø> (ø)
ubuntu_gcc_ppc64 73.78% <ø> (ø)
ubuntu_gcc_ppc64le 73.87% <ø> (ø)
ubuntu_gcc_ppc_no_power8 74.00% <ø> (ø)
ubuntu_gcc_s390x 74.19% <ø> (ø)
ubuntu_gcc_s390x_dfltcc 71.39% <ø> (ø)
ubuntu_gcc_s390x_dfltcc_compat 73.29% <ø> (ø)
ubuntu_gcc_s390x_no_crc32 73.98% <ø> (ø)
ubuntu_gcc_sparc64 74.22% <ø> (ø)
ubuntu_gcc_sprefix 72.69% <ø> (ø)
win64_gcc 73.33% <ø> (ø)
win64_gcc_compat_no_opt 74.15% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
compare256.c 100.00% <ø> (ø)
functable.c 74.56% <ø> (ø)
test/benchmarks/benchmark_compare256.cc 47.61% <ø> (ø)
test/test_compare256.cc 59.25% <ø> (ø)

... and 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@nmoinvaz
Copy link
Copy Markdown
Member

This check should be moved to zbuild.h where UNALIGNED_OK is defined.

@ccawley2011
Copy link
Copy Markdown
Contributor Author

This check should be moved to zbuild.h where UNALIGNED_OK is defined.

There's already a check there - the reason for this PR is that not all places that check UNALIGNED_OK seem to require little endian, such as in chunk_tpl.h and match_tpl.h.

@Dead2 Dead2 merged commit 38aa575 into zlib-ng:develop Apr 25, 2023
@Dead2
Copy link
Copy Markdown
Member

Dead2 commented Apr 25, 2023

@ccawley2011 If you want to make a backport PR against stable as well, I can accept that as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants