janestreet / ocaml_intrinsics

Provides functions to invoke amd64 instructions (such as clz,popcnt,rdtsc,rdpmc) when available, or compatible software implementation on other targets.
MIT License
30 stars 12 forks source link

Add ARM crc32 discovery #6

Closed gretay-js closed 2 years ago

gretay-js commented 2 years ago

From #3.

gretay-js commented 2 years ago

It should be noted that the check added in this PR is not safe: it can cause an illegal instruction to be executed (similar to the issue discussed in #5), if crc32 is used on armv8.0-a cpu that doesn't support crc32. We plan to address it in a separate PR. This does not affect arm64 on armv8.1-a and up which require crc32.