[PATCH] D28574: [scudo] Refactor of CRC32 and ARM runtime CRC32 detection

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 11 12:06:46 PST 2017


cryptoad created this revision.
cryptoad added reviewers: mgorny, alekseyshl, kcc.
cryptoad added a subscriber: llvm-commits.
Herald added subscribers: rengolin, aemerson.

ARM & AArch64 runtime detection for hardware support of CRC32 has been added
via check of the AT_HWVAL auxiliary vector.

Following Michal's suggestions in https://reviews.llvm.org/D28417, the CRC32 code has been further
changed and looks better now. When compiled with full relro (which is strongly
suggested to benefit from additional hardening), the weak symbol for
computeHardwareCRC32 is read-only and the assembly generated is fairly clean
and straight forward. As suggested, an additional optimization is to skip
the runtime check if SSE 4.2 has been enabled globally, as opposed to only
for scudo_crc32.cpp.

scudo_crc32.h has no purpose anymore and was removed.


https://reviews.llvm.org/D28574

Files:
  lib/scudo/scudo_allocator.cpp
  lib/scudo/scudo_crc32.cpp
  lib/scudo/scudo_crc32.h
  lib/scudo/scudo_utils.cpp
  lib/scudo/scudo_utils.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28574.84008.patch
Type: text/x-patch
Size: 6198 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170111/8e7a7749/attachment.bin>


More information about the llvm-commits mailing list