The old documentation seemed to suggest that the low 4 bits of bytes in `b` would index into the 32-element array `a`. That's not quite right and you'd need 5 bits to index 32 elements.
I saw in https://github.com/rust-lang/rust/issues/81037
that when you document private items with rustdoc the
`x86 AVX-512 BITALG` feature comment does not contain
scape characters in the message and therefore rustdoc
was emiting warnings.
This fixes it.
The recently added modules use target features that are not yet
available in rustc compiler used for bootstrapping.
Guard them with `#[cfg(not(bootstrap))]`.
This adds the AVX512BITALG intrinsics.
It also patches the verification against the Intel Intrinsic Guide
because Rust uses a different naming.
Added intrinsics match _mm(256|512)?(_maskz?)?_popcnt_epi(8|16) for the popcount ones
and _mm(256|512)?(_mask)?_bitshuffle_epi64_mask
Adds all 18 intrinsics belongin to AVX512VPOPCNTDQ counting the number of set bits in packed 32 / 64 bit integers.
Intrinsics match _mm(256|512)?(_maskz?)?_popcnt_epi(32|64).
Versions for packed 8 and 16 bit integers are part of BITALG.
`_xgetbv` was reimplemented to use inline assembly in #333 since LLVM
3.9 didn't export the intrinsic we needed to use. LLVM 4.0 has since
rectified that issue, and since rust's minimum supported version of LLVM
is 8.0, this change can be reverted.
The x86 code contains several macros that following this pattern:
```rust
macro_rules! expr {
() => { true; }
}
fn bar(_val: bool) {}
fn main() {
bar(expr!());
}
```
Here, we have a macro `expr!` that expands to tokens sequence with
a trailing semicolon.
Currently, the trailing semicolon is ignored when the macro is invoked
in expression position, due to https://github.com/rust-lang/rust/issues/33953
If this behavior is changed, then a large number of macro invocations in
`stdarch` will stop compiling.
Regardless of whether nor not this change is made, removing the
semicolon more clearly expresses the intent of the code - these macros
are designed to expand to the result of a function call, not ignore its
results (as the `;` would suggest).