Skip to content

Commit

Permalink
IGL | NameHandle : Fix bug in iglCrc32ImplARM8
Browse files Browse the repository at this point in the history
Reviewed By: syeh1, corporateshark

Differential Revision: D63723285

fbshipit-source-id: 278c1ba88a90599770c674318463c30ff92015fc
  • Loading branch information
Dev Mannemela authored and facebook-github-bot committed Oct 2, 2024
1 parent 535985c commit 0fcd655
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/igl/NameHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ bool isAligned(const void* p) {
}
namespace {
uint32_t iglCrc32ImplARM8(const char* s, uint32_t crc, size_t length) {
for (; !isAligned<uint32_t>(s) && length > 0; s++, length--) {
for (; !isAligned<uint64_t>(s) && length > 0; s++, length--) {
crc = __crc32b(crc, *s);
}

for (; length > 8 && isAligned<uint64_t>(s); s += 8, length -= 8) {
for (; length >= 8; s += 8, length -= 8) {
crc = __crc32d(crc, *(const uint64_t*)(s));
}

for (; length > 4; s += 4, length -= 4) {
for (; length >= 4; s += 4, length -= 4) {
crc = __crc32w(crc, *(const uint32_t*)(s));
}

Expand Down

0 comments on commit 0fcd655

Please sign in to comment.