Skip to content

Guard SSE4.2 CRC32C implementation for non-x86 builds #109

Description

@coderabbitai

Issue Description

The SSE4.2 optimized CRC32C implementation in src/lib_bra_crc32c.c (lines 88-145) is not properly guarded for non-x86 architectures. When building on ARM or other non-x86 platforms, the _mm_crc32_* intrinsics are undefined, causing compilation failures.

Current Status

  • Currently only targeting x64 CPUs, so not immediately blocking
  • SSE4.2 intrinsics header (<nmmintrin.h>) is already properly guarded
  • Function definition needs similar architecture guards

Proposed Solution

Wrap the bra_crc32c_sse42 implementation in architecture guards and provide a fallback that delegates to the table-based implementation for non-x86 builds.

References

Metadata

Metadata

Assignees

Labels

duplicateThis issue or pull request already existsenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions