diff options
author | Derek Mauro <dmauro@google.com> | 2022-12-12 09:21:33 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-12-12 09:22:24 -0800 |
commit | b23ae860ba864e4224aab7f7073d7d0d60f05a43 (patch) | |
tree | fa0d6e7180fec41cec085ab9e3482afd47a17df9 /absl | |
parent | ff5644bb34333d2ad7f1abf421d57bda155398e7 (diff) |
Add a define for HWCAP_CPUID on platforms that are missing it
PiperOrigin-RevId: 494749165
Change-Id: I8d855be9c508a9fdfb5f60e87471c0947057ecc9
Diffstat (limited to 'absl')
-rw-r--r-- | absl/crc/internal/cpu_detect.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/absl/crc/internal/cpu_detect.cc b/absl/crc/internal/cpu_detect.cc index 8b16d84a..d61b7018 100644 --- a/absl/crc/internal/cpu_detect.cc +++ b/absl/crc/internal/cpu_detect.cc @@ -211,6 +211,10 @@ bool SupportsArmCRC32PMULL() { return false; } #elif defined(__aarch64__) && defined(__linux__) +#ifndef HWCAP_CPUID +#define HWCAP_CPUID (1 << 11) +#endif + #define ABSL_INTERNAL_AARCH64_ID_REG_READ(id, val) \ asm("mrs %0, " #id : "=r"(val)) |