[Clang][SME2] Enable multi-vector loads & stores for SME2 (#75821)
[llvm-project.git] / compiler-rt / lib / scudo / standalone / crc32_hw.cpp
blob73f2ae000c63d671d6ac3197a26d5dd8153f19c4
1 //===-- crc32_hw.cpp --------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "checksum.h"
11 namespace scudo {
13 #if defined(__CRC32__) || defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
14 u32 computeHardwareCRC32(u32 Crc, uptr Data) {
15 return static_cast<u32>(CRC32_INTRINSIC(Crc, Data));
17 #endif // defined(__CRC32__) || defined(__SSE4_2__) ||
18 // defined(__ARM_FEATURE_CRC32)
20 } // namespace scudo