From 120dff527eb225212f782d256cff5ffa4d903192 Mon Sep 17 00:00:00 2001 From: lkcl Date: Mon, 28 Dec 2020 16:31:32 +0000 Subject: [PATCH] --- openpower/sv/bitmanip.mdwn | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/openpower/sv/bitmanip.mdwn b/openpower/sv/bitmanip.mdwn index 21eebc708..5a1dae78c 100644 --- a/openpower/sv/bitmanip.mdwn +++ b/openpower/sv/bitmanip.mdwn @@ -244,8 +244,5 @@ uint_xlen_t crc32_b(uint_xlen_t rs1) { return crc32(rs1, 8); } uint_xlen_t crc32 uint_xlen_t crc32c_b(uint_xlen_t rs1) { return crc32c(rs1, 8); } uint_xlen_t crc32c_h(uint_xlen_t rs1) { return crc32c(rs1, 16); } uint_xlen_t crc32c_w(uint_xlen_t rs1) { return crc32c(rs1, 32); } #if XLEN > 32 uint_xlen_t crc32_d (uint_xlen_t rs1) { return crc32 (rs1, 64); } uint_xlen_t crc32c_d(uint_xlen_t rs1) { return crc32c(rs1, 64); } #endif -Payload data must be XOR’ed into the LSB end of the state before executing the CRC instruction. The following code demonstrates the use of crc32.b: -uint32_t crc32_demo(const uint8_t *p, int len) { uint32_t x = 0xffffffff; -for (int i = 0; i < len; i++) { x = x ^ p[i]; -x = crc32_b(x); } }return ~x; + ``` -- 2.30.2