Conversation
The ARM64EC is a new Microsoft-designed ARM64 ABI that is compatible with AMD64 code. However, not all AMD64 intrinsic functions are supported. For, intrinsics that are lowered to AVX, AVX2 and AVX512 instructions are not supported, including the _tzcnt_u64. To make sure this file compiles for ARM64EC, the use of _tzcnt_u64 should be neutered.
|
Interesting, |
|
Thanks. I don't know how the current qemu tests work, but if you have an environment with Visual Studio 2022 17.1 preview installed with all the ARM64EC individual components, you may be able to build the lib + all the tests. The tests need to be run on ARM64 windows 11 though. |
That's unlikely to be compatible with CI unfortunately. |
|
That's unfortunate, but totally understandable, since the ARM64EC is still in its infancy stage right now. We are building opensource projects as ARM64EC and porting the code if needed. Similar changes have been committed to other projects. See here for another example. :) |
| if (LZ4_isLittleEndian()) { | ||
| if (sizeof(val) == 8) { | ||
| # if defined(_MSC_VER) && (_MSC_VER >= 1800) && defined(_M_AMD64) && !defined(LZ4_FORCE_SW_BITCOUNT) | ||
| # if defined(_MSC_VER) && (_MSC_VER >= 1800) && (defined(_M_AMD64) && !defined(_M_ARM64EC)) && !defined(LZ4_FORCE_SW_BITCOUNT) |
There was a problem hiding this comment.
Could you please add a one-line comment explaining why _M_ARM64EC must be exclude ?
Essentially a summary of what you already explain in the PR, just hosted directly in the code source.
There was a problem hiding this comment.
Thanks, I just added comments.
|
Thank you for your review! |
The ARM64EC is a new Microsoft-designed ARM64 ABI that is compatible with AMD64 code. However, not all AMD64 intrinsic functions are supported. For, intrinsics that are lowered to AVX, AVX2 and AVX512 instructions are not supported, including the _tzcnt_u64. To make sure this file compiles for ARM64EC, the use of _tzcnt_u64 should be neutered.