Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug: `_mm_test_mix_ones_zeros` always returned true. The function wasn't reducing `zf` and `cf` to a bool before combining them. The fix proposed here isn't the most efficient, but at least it is correct. Note(s): The arguments are named incorrectly in the `_mm_test_mix_ones_zeros` documentation[0]. The second argument is the mask, as per the behavior of `_mm_test_mix_ones_zeros` with gcc and clang. This naming error seems to have propagated through both gcc[1] and llvm[2] headers but not to rust[3] headers or sse2neon[4]. [0] https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=ptest&techs=SSE_ALL&ig_expand=6902 [1] https://github.com/gcc-mirror/gcc/blob/27ce74fa23c93c1189c301993cd19ea766e6bdb5/gcc/config/i386/smmintrin.h#L94 [2] https://github.com/llvm/llvm-project/blob/70535f5e609f747c28cfef699eefb84581b0aac0/clang/lib/Headers/smmintrin.h#L1130 [3] https://github.com/rust-lang/stdarch/blob/f4528dd6e85d97bb802240d7cd048b6e1bf72540/crates/core_arch/src/x86/sse41.rs#L1149 [4] https://github.com/DLTcollab/sse2neon/blob/243e90f654193c97a691b1a53213d091e02eb631/sse2neon.h#L7595
- Loading branch information