jimmystewpot commented on code in PR #3754:
URL: https://github.com/apache/brpc/pull/3754#discussion_r4729448610
##########
test/crc32c_unittest.cc:
##########
@@ -61,6 +141,32 @@ TEST_F(CRC, Extend) {
Extend(Value("hello ", 6), "world", 5));
}
+TEST_F(CRC, ChunkIndependence) {
+ if (IsBigEndianArm64()) {
+ GTEST_SKIP() << "Big-endian ARM64 preserves legacy software CRC32C path";
+ }
Review Comment:
Added in `f2deb5ac`.
Added `CRC.BigEndianArm64LegacyCompatibility` in `test/crc32c_unittest.cc`,
guarded on both compile-time big-endian ARM64 (`IsBigEndianArm64()`) and
runtime big-endian byte order (`IsRuntimeBigEndian()`) so it runs on real
big-endian ARM64 systems and skips cleanly on little-endian hosts. It aligns
`0a 06 00 00 00 00 00 00` to 16 bytes, asserts `IsFastCrc32Supported()` and
`IsArm64PmullSelectedForTest()` are `false`, and checks `Extend(0, ..., 8) ==
0x5014f1f7U` (the historical merge-base value, distinct from standard
little-endian CRC32C `0x298dd05fU`).
Also expanded `CRC.Arm64PmullStripeBoundaries` with post-alignment boundary
lengths (`194, 198, 199, 200, 1010, 1014, 1015, 1016`) so misaligned starts
(`align 1..7`) land directly on the 192-byte and 1008-byte PMULL stripe
thresholds.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]