Skip to content

Commit

Permalink
lib/lz4: Use ARM64 v8 ASM to accelerate lz4 decompression
Browse files Browse the repository at this point in the history
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
  • Loading branch information
Tashar02 authored and toraidl committed Mar 7, 2024
1 parent 5e41ba0 commit 8baae95
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/lz4/lz4_decompress.c
Original file line number Diff line number Diff line change
Expand Up @@ -850,8 +850,13 @@ static int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode,
if (lz4sd->prefixSize == 0) {
/* The first call, no dictionary yet. */
assert(lz4sd->extDictSize == 0);
result = LZ4_decompress_safe(source, dest,
compressedSize, maxOutputSize);
#if defined(CONFIG_ARM64) && defined(CONFIG_KERNEL_MODE_NEON)
result = LZ4_arm64_decompress_safe(source, dest, compressedSize,
maxOutputSize, false);
#else
result = LZ4_decompress_safe(source, dest, compressedSize,
maxOutputSize);
#endif
if (result <= 0)
return result;
lz4sd->prefixSize = result;
Expand Down

0 comments on commit 8baae95

Please sign in to comment.