Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow bypassing runtime feature check of TZCNT instructions. #1186

Merged
merged 2 commits into from
Mar 16, 2022

Conversation

mtl1979
Copy link
Collaborator

@mtl1979 mtl1979 commented Mar 13, 2022

  • This avoids conditional branch when it's known at build time that TZCNT instructions are always supported

See discussion in comments of 9bd28d9

@codecov
Copy link

codecov bot commented Mar 13, 2022

Codecov Report

Merging #1186 (f6cc79f) into develop (a5a9844) will decrease coverage by 0.42%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1186      +/-   ##
===========================================
- Coverage    87.96%   87.54%   -0.43%     
===========================================
  Files          108      112       +4     
  Lines         9283     9601     +318     
  Branches      2310     2422     +112     
===========================================
+ Hits          8166     8405     +239     
- Misses         921      953      +32     
- Partials       196      243      +47     
Flag Coverage Δ
macos_clang 27.58% <ø> (ø)
macos_gcc 71.04% <ø> (ø)
ubuntu_clang 86.06% <ø> (+0.02%) ⬆️
ubuntu_clang_debug 85.86% <ø> (+0.02%) ⬆️
ubuntu_clang_inflate_allow_invalid_dist 85.27% <ø> (-0.62%) ⬇️
ubuntu_clang_inflate_strict 85.36% <ø> (-0.62%) ⬇️
ubuntu_clang_mmap 86.12% <ø> (+0.67%) ⬆️
ubuntu_clang_pigz 39.71% <ø> (ø)
ubuntu_clang_pigz_no_optim 39.97% <ø> (ø)
ubuntu_clang_pigz_no_threads 39.29% <ø> (ø)
ubuntu_clang_reduced_mem 86.25% <ø> (+0.67%) ⬆️
ubuntu_gcc 72.52% <ø> (-0.53%) ⬇️
ubuntu_gcc_aarch64 72.70% <ø> (ø)
ubuntu_gcc_aarch64_compat_no_opt 70.10% <ø> (ø)
ubuntu_gcc_aarch64_no_acle 70.98% <ø> (ø)
ubuntu_gcc_aarch64_no_neon 70.94% <ø> (ø)
ubuntu_gcc_armhf 72.69% <ø> (ø)
ubuntu_gcc_armhf_compat_no_opt 70.01% <ø> (ø)
ubuntu_gcc_armhf_no_acle 72.71% <ø> (ø)
ubuntu_gcc_armhf_no_neon 72.65% <ø> (ø)
ubuntu_gcc_armsf 72.69% <ø> (ø)
ubuntu_gcc_armsf_compat_no_opt 70.01% <ø> (ø)
ubuntu_gcc_benchmark 74.62% <ø> (+0.04%) ⬆️
ubuntu_gcc_compat_no_opt 71.98% <ø> (ø)
ubuntu_gcc_compat_sprefix 74.02% <ø> (+0.04%) ⬆️
ubuntu_gcc_mingw_i686 ?
ubuntu_gcc_mingw_x86_64 0.00% <ø> (ø)
ubuntu_gcc_no_avx2 71.78% <ø> (+0.35%) ⬆️
ubuntu_gcc_no_ctz 73.91% <ø> (ø)
ubuntu_gcc_no_ctzll 73.67% <ø> (ø)
ubuntu_gcc_no_pclmulqdq 70.73% <ø> (+0.03%) ⬆️
ubuntu_gcc_no_sse2 71.17% <ø> (-0.39%) ⬇️
ubuntu_gcc_no_sse4 71.53% <ø> (+0.41%) ⬆️
ubuntu_gcc_o3 74.00% <ø> (ø)
ubuntu_gcc_osb ∅ <ø> (∅)
ubuntu_gcc_pigz 37.72% <ø> (-0.09%) ⬇️
ubuntu_gcc_pigz_aarch64 38.30% <ø> (+0.02%) ⬆️
ubuntu_gcc_ppc 73.39% <ø> (ø)
ubuntu_gcc_ppc64 74.15% <ø> (ø)
ubuntu_gcc_ppc64le 73.34% <ø> (ø)
ubuntu_gcc_ppc_no_power8 74.39% <ø> (ø)
ubuntu_gcc_s390x 74.40% <ø> (ø)
ubuntu_gcc_s390x_dfltcc 73.10% <ø> (?)
ubuntu_gcc_s390x_dfltcc_compat 70.78% <ø> (?)
ubuntu_gcc_s390x_no_crc32 74.16% <ø> (ø)
ubuntu_gcc_sparc64 74.29% <ø> (ø)
ubuntu_gcc_sprefix 73.83% <ø> (+0.04%) ⬆️
win64_gcc 73.00% <ø> (ø)
win64_gcc_compat_no_opt 72.73% <ø> (ø)

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

Impacted Files Coverage Δ
fallback_builtins.h 100.00% <ø> (ø)
inflate_p.h 97.14% <0.00%> (-2.86%) ⬇️
deflate.c 82.49% <0.00%> (-0.44%) ⬇️
gzlib.c 69.33% <0.00%> (ø)
uncompr.c 90.90% <0.00%> (ø)
arch/s390/dfltcc_deflate.c 70.58% <0.00%> (ø)
arch/s390/dfltcc_common.c 84.84% <0.00%> (ø)
arch/s390/dfltcc_detail.h 54.90% <0.00%> (ø)
arch/s390/dfltcc_inflate.c 88.88% <0.00%> (ø)
inflate.c 94.43% <0.00%> (+0.01%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a5a9844...f6cc79f. Read the comment docs.

Copy link
Member

@nmoinvaz nmoinvaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add this flag to README.md.

CMakeLists.txt Show resolved Hide resolved
@nmoinvaz
Copy link
Member

We are also missing FORCE_SSE2 in the README.md (but the configure flag is there). If you add FORCE_SSE2 to readme I think it would be okay as separate commit.

* This avoids conditional branch when it's known at build time that TZCNT instructions are always supported
@mtl1979
Copy link
Collaborator Author

mtl1979 commented Mar 14, 2022

Need to add this flag to README.md.

Added... I was delaying non-code additions due to long backlog on GitHub actions...

@mtl1979 mtl1979 requested a review from nmoinvaz March 14, 2022 18:07
@Dead2 Dead2 merged commit 15e5df6 into zlib-ng:develop Mar 16, 2022
@Dead2 Dead2 mentioned this pull request Dec 27, 2022
Dead2 added a commit that referenced this pull request Mar 7, 2023
Changes since 2.0.6:
- Fix CVE-2022-37434 #1328
- Fix chunkmemset #1196
- Fix deflateBound too small #1236
- Fix Z_SOLO #1263
- Fix ACLE variant of crc32 #1274
- Fix inflateBack #1311
- Fix deflate_quick windowsize #1431
- Fix DFLTCC bugs related to adler32 #1349 and #1390
- Fix warnings #1194 #1312 #1362
- MacOS build fix #1198
- Add invalid windowBits handling #1293
- Support for Force TZCNT #1186
- Support for aligned_alloc() #1360
- Minideflate improvements #1175 #1238
- Dont use unaligned access for memcpy #1309
- Build system #1209 #1233 #1267 #1273 #1278 #1292 #1316 #1318 #1365
- Test improvements #1208 #1227 #1241 #1353
- Cleanup #1266
- Documentation #1205 #1359
- Misc improvements #1294 #1297 #1306 #1344 #1348
- Backported zlib fixes
- Backported CI workflows from Develop branch
Dead2 added a commit that referenced this pull request Mar 17, 2023
Changes since 2.0.6:
- Fix CVE-2022-37434 #1328
- Fix chunkmemset #1196
- Fix deflateBound too small #1236
- Fix Z_SOLO #1263
- Fix ACLE variant of crc32 #1274
- Fix inflateBack #1311
- Fix deflate_quick windowsize #1431
- Fix DFLTCC bugs related to adler32 #1349 and #1390
- Fix warnings #1194 #1312 #1362
- MacOS build fix #1198
- Add invalid windowBits handling #1293
- Support for Force TZCNT #1186
- Support for aligned_alloc() #1360
- Minideflate improvements #1175 #1238
- Dont use unaligned access for memcpy #1309
- Build system #1209 #1233 #1267 #1273 #1278 #1292 #1316 #1318 #1365
- Test improvements #1208 #1227 #1241 #1353
- Cleanup #1266
- Documentation #1205 #1359
- Misc improvements #1294 #1297 #1306 #1344 #1348
- Backported zlib fixes
- Backported CI workflows from Develop branch
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.

None yet

3 participants