Skip to content
Permalink
Browse files
MDEV-23495: Refine Arm64 PMULL runtime check in MariaDB
Raspberry Pi 4 supports crc32 but doesn't support pmull (MDEV-23030).

The PR #1645 offers a solution to fix this issue. But it does not consider
the condition that the target platform does support crc32 but not support PMULL.

In this condition, it should leverage the Arm64 crc32 instruction (__crc32c) and
just only skip parallel computation (pmull/vmull) rather than skip all hardware
crc32 instruction of computation.

The PR also removes unnecessary CRC32_ZERO branch in 'crc32c_aarch64' for MariaDB,
formats the indent and coding style.

Change-Id: I76371a6bd767b4985600e8cca10983d71b7e9459
Signed-off-by: Yuqi Gu <yuqi.gu@arm.com>
  • Loading branch information
guyuqi authored and dr-m committed Aug 21, 2020
1 parent 0b4ed0b commit 151fc0e
Show file tree
Hide file tree
Showing 3 changed files with 193 additions and 245 deletions.
@@ -911,9 +911,7 @@ extern MYSQL_PLUGIN_IMPORT my_crc32_t my_checksum;

#if defined(__GNUC__) && defined(HAVE_ARMV8_CRC)
int crc32_aarch64_available(void);
#if defined(HAVE_ARMV8_CRYPTO)
int crc32c_aarch64_available(void);
#endif
const char *crc32c_aarch64_available(void);
#endif

#ifdef DBUG_ASSERT_EXISTS

0 comments on commit 151fc0e

Please sign in to comment.