Skip to content

Commit

Permalink
Update cpu_detect.cc fix hw crc32 and AES capability checkfix undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Dertosh authored Dec 9, 2024
1 parent 9e3b68a commit a197221
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions absl/crc/internal/cpu_detect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,12 @@ CpuType GetCpuType() {
}

bool SupportsArmCRC32PMULL() {
#if defined(HWCAP_CRC32) && defined(HWCAP_CRC32PMULL)
uint64_t hwcaps = getauxval(AT_HWCAP);
return (hwcaps & HWCAP_CRC32) && (hwcaps & HWCAP_PMULL);
#else
return false;
#endif
}

#else
Expand Down

0 comments on commit a197221

Please sign in to comment.