diff options
author | Adenilson Cavalcanti <cavalcantii@chromium.org> | 2024-03-18 19:57:28 +0000 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-03-18 13:29:15 -0700 |
commit | 24c07df5033183efad8607cba62e746bea7180bf (patch) | |
tree | b32f04dc3feca68731b11b9a19c4b864e9f51171 /adler32.c | |
parent | 24342f69e01ccf34e8fd3ac21edd2b65d2a33267 (diff) | |
download | zlib-24c07df5033183efad8607cba62e746bea7180bf.tar.gz |
[zlib][riscv] Adding support for RISCV
Adding code to perform CPU features detection at runtime as also calls
in the entry points before processing (e.g. deflateInit(), etc).
Also add the missing bits in the CMake buildsystem to pass the proper
compiler flags and set up the defines that guard optimizations
(e.g. DEFLATE_SLIDE_HASH_RVV, ADLER32_SIMD_RVV for now).
Todo: update the GN buildsystem next.
Bug: 329282661
Change-Id: Ic5a2846b0404393d6d7ffcbd75db800725887ae5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5369154
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1274387}
NOKEYCHECK=True
GitOrigin-RevId: fd5ebdf2a679244930de70972e6d435e274fceee
Diffstat (limited to 'adler32.c')
-rw-r--r-- | adler32.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -90,7 +90,8 @@ uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, z_size_t len) { return adler | (sum2 << 16); } -#if defined(ADLER32_SIMD_SSSE3) || defined(ADLER32_SIMD_NEON) +#if defined(ADLER32_SIMD_SSSE3) || defined(ADLER32_SIMD_NEON) \ + || defined(RISCV_RVV) /* * Use SIMD to compute the adler32. Since this function can be * freely used, check CPU features here. zlib convention is to |