diff options
| author | Ralf Jung <post@ralfj.de> | 2023-12-03 16:02:42 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-12-03 16:02:42 +0100 |
| commit | 81af496d7cbe7f4ebee2186f9e458beedeb997e5 (patch) | |
| tree | 6987f6080d7d970e083c17f7501c5220b3c46400 | |
| parent | e0e9a4517f9fc021283514da387e70a56061bd3e (diff) | |
| download | rust-81af496d7cbe7f4ebee2186f9e458beedeb997e5.tar.gz rust-81af496d7cbe7f4ebee2186f9e458beedeb997e5.zip | |
fix simd_bitmask docs
| -rw-r--r-- | crates/core_simd/src/intrinsics.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/core_simd/src/intrinsics.rs b/crates/core_simd/src/intrinsics.rs index b27893bc729..5260de93354 100644 --- a/crates/core_simd/src/intrinsics.rs +++ b/crates/core_simd/src/intrinsics.rs @@ -132,9 +132,10 @@ extern "platform-intrinsic" { // `fn simd_bitmask(vector) -> unsigned integer` takes a vector of integers and // returns either an unsigned integer or array of `u8`. // Every element in the vector becomes a single bit in the returned bitmask. - // If the vector has less than 8 lanes, a u8 is returned with zeroed trailing bits. // The bit order of the result depends on the byte endianness. LSB-first for little // endian and MSB-first for big endian. + // If the vector has less than 8 lanes, the mask lives in the least-significant bits + // (e.g., [true, false] becomes `0b01` on little endian and `0b10` on big endian). // // UB if called on a vector with values other than 0 and -1. #[allow(unused)] |
