From 92fc8733fabd6be625c57e2ce441fd7851dff38a Mon Sep 17 00:00:00 2001 From: Jerry Yu Date: Fri, 3 Apr 2020 12:31:31 +0800 Subject: [PATCH] crc32: Fix prototype mismatch bug Change-Id: I7c8a2348441f32a43ff386122612405e418d9947 Signed-off-by: Jerry Yu --- crc/aarch64/crc32_common_mix_neoverse_n1.S | 12 ++++-------- crc/aarch64/crc32_mix_neoverse_n1.S | 8 ++++++-- crc/aarch64/crc32c_mix_neoverse_n1.S | 6 +++++- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/crc/aarch64/crc32_common_mix_neoverse_n1.S b/crc/aarch64/crc32_common_mix_neoverse_n1.S index 91b331d..c8524a3 100644 --- a/crc/aarch64/crc32_common_mix_neoverse_n1.S +++ b/crc/aarch64/crc32_common_mix_neoverse_n1.S @@ -56,18 +56,14 @@ vzr .req v26 - BUF .req x0 - LEN .req x1 - CRC .req x2 - wCRC .req w2 const_addr .req x3 crc_blk_ptr .req x4 pmull_blk_ptr .req x5 crc_data0 .req x6 crc_data1 .req x7 - crc_data2 .req x19 - crc_data3 .req x20 - wPmull .req w21 + crc_data2 .req x9 + crc_data3 .req x10 + wPmull .req w11 data0 .req x4 data1 .req x5 @@ -383,7 +379,7 @@ start_final: bge .loop_64B .loop_16B: - cmp x1, 15 + cmp LEN, 15 bls .less_16B ldp data0, data1, [BUF],#16 sub LEN,LEN,#16 diff --git a/crc/aarch64/crc32_mix_neoverse_n1.S b/crc/aarch64/crc32_mix_neoverse_n1.S index fa29770..2713e62 100644 --- a/crc/aarch64/crc32_mix_neoverse_n1.S +++ b/crc/aarch64/crc32_mix_neoverse_n1.S @@ -54,9 +54,13 @@ /** - * uint32_t crc32_mix_neoverse_n1(uint32_t * BUF, - * size_t LEN, uint CRC) + * uint32_t crc32_mix_neoverse_n1(uint CRC ,uint8_t * BUF, + * size_t LEN) */ + BUF .req x1 + LEN .req x2 + CRC .req x0 + wCRC .req w0 .align 6 .global crc32_mix_neoverse_n1 .type crc32_mix_neoverse_n1, %function diff --git a/crc/aarch64/crc32c_mix_neoverse_n1.S b/crc/aarch64/crc32c_mix_neoverse_n1.S index 6982b39..c1b3835 100644 --- a/crc/aarch64/crc32c_mix_neoverse_n1.S +++ b/crc/aarch64/crc32c_mix_neoverse_n1.S @@ -53,9 +53,13 @@ crc32cb \dst,\src,\data .endm /** - * uint32_t crc32c_mix_neoverse_n1(uint32_t * BUF, + * uint32_t crc32c_mix_neoverse_n1(uint8_t * BUF, * size_t LEN, uint CRC) */ + BUF .req x0 + LEN .req x1 + CRC .req x2 + wCRC .req w2 .align 6 .global crc32c_mix_neoverse_n1 .type crc32c_mix_neoverse_n1, %function