1 //===-- scudo_crc32.cpp -----------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 /// CRC32 function leveraging hardware specific instructions. This has to be
11 /// kept separated to restrict the use of compiler specific flags to this file.
13 //===----------------------------------------------------------------------===//
15 #include "scudo_crc32.h"
19 #if defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
20 u32 computeHardwareCRC32(u32 Crc, uptr Data) {
21 return CRC32_INTRINSIC(Crc, Data);
23 #endif // defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32)
25 } // namespace __scudo