diff options
| author | Vladislav Shchapov <vladislav@shchapov.ru> | 2025-07-03 20:58:16 +0500 |
|---|---|---|
| committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2025-07-11 16:12:18 +0200 |
| commit | 770baa4f555e38bf15ea44308532278612cce457 (patch) | |
| tree | c3b30e29b67f6928d1a4b79df12520557cc21733 /test | |
| parent | caba1ef6fdf138953b1ed8b43f5252643e8403bf (diff) | |
| download | Project-Tick-770baa4f555e38bf15ea44308532278612cce457.tar.gz Project-Tick-770baa4f555e38bf15ea44308532278612cce457.zip | |
Rewrite LoongArch64 CRC32 implementation based on ARMv8 with manual alignment
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_crc32.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test_crc32.cc b/test/test_crc32.cc index b05f220da4..d44d079e97 100644 --- a/test/test_crc32.cc +++ b/test/test_crc32.cc @@ -282,7 +282,7 @@ TEST_CRC32(native, native_crc32, 1) #else -#ifdef ARM_CRC32 +#if defined(ARM_CRC32) || defined(LOONGARCH_CRC) static const int align_offsets[] = { 1, 2, 3, 4, 5, 6, 7 }; @@ -295,7 +295,9 @@ static const int align_offsets[] = { } \ hash(GetParam(), func); \ } +#endif +#ifdef ARM_CRC32 INSTANTIATE_TEST_SUITE_P(crc32_alignment, crc32_align, testing::ValuesIn(align_offsets)); TEST_CRC32(armv8, crc32_armv8, test_cpu_features.arm.has_crc32) TEST_CRC32_ALIGN(armv8_align, crc32_armv8, test_cpu_features.arm.has_crc32) @@ -322,7 +324,9 @@ TEST_CRC32(chorba_sse2, crc32_chorba_sse2, test_cpu_features.x86.has_sse2) TEST_CRC32(chorba_sse41, crc32_chorba_sse41, test_cpu_features.x86.has_sse41) #endif #if defined(LOONGARCH_CRC) +INSTANTIATE_TEST_SUITE_P(crc32_alignment, crc32_align, testing::ValuesIn(align_offsets)); TEST_CRC32(loongarch64, crc32_loongarch64, test_cpu_features.loongarch.has_crc) +TEST_CRC32_ALIGN(loongarch64_align, crc32_loongarch64, test_cpu_features.loongarch.has_crc) #endif #endif |
