diff options
author | Abseil Team <absl-team@google.com> | 2023-08-30 14:06:28 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-08-30 14:07:28 -0700 |
commit | c99fbc0a5cfd8c4050a0da3b9f7b4833ba931701 (patch) | |
tree | 6c930ebe570784945d640b9788765f993882a53a | |
parent | 37770938fc0fc9b25f458434031cf3d8f6c65e95 (diff) |
Add CPU detection for Ampere Siryn
PiperOrigin-RevId: 561444259
Change-Id: I205ba9f11f4d41163ce74ae9cfa417fe500ccab3
-rw-r--r-- | absl/crc/internal/cpu_detect.cc | 3 | ||||
-rw-r--r-- | absl/crc/internal/cpu_detect.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/absl/crc/internal/cpu_detect.cc b/absl/crc/internal/cpu_detect.cc index 8f668e3a..b3078137 100644 --- a/absl/crc/internal/cpu_detect.cc +++ b/absl/crc/internal/cpu_detect.cc @@ -246,6 +246,9 @@ CpuType GetCpuType() { if (implementer == 0x41 && part_number == 0xd0c) { return CpuType::kArmNeoverseN1; } + if (implementer == 0xc0 && part_number == 0xac3) { + return CpuType::kAmpereSiryn; + } } return CpuType::kUnknown; } diff --git a/absl/crc/internal/cpu_detect.h b/absl/crc/internal/cpu_detect.h index 945379f5..8d09dc27 100644 --- a/absl/crc/internal/cpu_detect.h +++ b/absl/crc/internal/cpu_detect.h @@ -39,6 +39,7 @@ enum class CpuType { kIntelSandybridge, kIntelWestmere, kArmNeoverseN1, + kAmpereSiryn, }; // Returns the type of host CPU this code is running on. Returns kUnknown if |