Skip to content

Commit d055c8f

Browse files
nyurikAmanieu
authored andcommitted
Clean up docs, fixing indentation and formatting
1 parent 679eba8 commit d055c8f

File tree

8 files changed

+28
-33
lines changed

8 files changed

+28
-33
lines changed

crates/core_arch/src/core_arch_docs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ detail!
142142
the standard library, this macro will perform necessary runtime detection
143143
to determine whether the CPU the program is running on supports the
144144
specified feature. In this case the macro will expand to a boolean
145-
expression evaluating to whether the local CPU has the AVX2 feature or
146-
not.
145+
expression evaluating to whether the local CPU has the AVX2 feature or
146+
not.
147147

148148
Note that this macro, like the `arch` module, is platform-specific. For
149149
example calling `is_x86_feature_detected!("avx2")` on ARM will be a

crates/core_arch/src/simd.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,6 @@ simd_m_ty!(
473473
x7
474474
);
475475

476-
477476
// 512-bit wide types:
478477

479478
simd_ty!(
@@ -965,6 +964,6 @@ pub(crate) fn debug_simd_finish<T: crate::fmt::Debug, const N: usize>(
965964
crate::fmt::Formatter::debug_tuple_fields_finish(
966965
formatter,
967966
type_name,
968-
&crate::array::from_fn::<&dyn crate::fmt::Debug, N, _>(|i| &array[i])
967+
&crate::array::from_fn::<&dyn crate::fmt::Debug, N, _>(|i| &array[i]),
969968
)
970969
}

crates/core_arch/src/x86/abm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
//! The references are:
66
//!
77
//! - [Intel 64 and IA-32 Architectures Software Developer's Manual Volume 2:
8-
//! Instruction Set Reference, A-Z][intel64_ref].
8+
//! Instruction Set Reference, A-Z][intel64_ref].
99
//! - [AMD64 Architecture Programmer's Manual, Volume 3: General-Purpose and
10-
//! System Instructions][amd64_ref].
10+
//! System Instructions][amd64_ref].
1111
//!
1212
//! [Wikipedia][wikipedia_bmi] provides a quick overview of the instructions
1313
//! available.

crates/core_arch/src/x86/avx.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
//! The references are:
44
//!
55
//! - [Intel 64 and IA-32 Architectures Software Developer's Manual Volume 2:
6-
//! Instruction Set Reference, A-Z][intel64_ref]. - [AMD64 Architecture
7-
//! Programmer's Manual, Volume 3: General-Purpose and System
8-
//! Instructions][amd64_ref].
6+
//! Instruction Set Reference, A-Z][intel64_ref]. - [AMD64 Architecture
7+
//! Programmer's Manual, Volume 3: General-Purpose and System
8+
//! Instructions][amd64_ref].
99
//!
1010
//! [Wikipedia][wiki] provides a quick overview of the instructions available.
1111
//!

crates/core_arch/src/x86/sse.rs

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,21 +1452,19 @@ pub unsafe fn _mm_getcsr() -> u32 {
14521452
///
14531453
/// It contains several groups of flags:
14541454
///
1455-
/// * *Exception flags* report which exceptions occurred since last they were
1456-
/// reset.
1455+
/// * *Exception flags* report which exceptions occurred since last they were reset.
14571456
///
1458-
/// * *Masking flags* can be used to mask (ignore) certain exceptions. By
1459-
/// default
1460-
/// these flags are all set to 1, so all exceptions are masked. When an
1461-
/// an exception is masked, the processor simply sets the exception flag and
1462-
/// continues the operation. If the exception is unmasked, the flag is also set
1463-
/// but additionally an exception handler is invoked.
1457+
/// * *Masking flags* can be used to mask (ignore) certain exceptions. By default
1458+
/// these flags are all set to 1, so all exceptions are masked. When
1459+
/// an exception is masked, the processor simply sets the exception flag and
1460+
/// continues the operation. If the exception is unmasked, the flag is also set
1461+
/// but additionally an exception handler is invoked.
14641462
///
14651463
/// * *Rounding mode flags* control the rounding mode of floating point
1466-
/// instructions.
1464+
/// instructions.
14671465
///
14681466
/// * The *denormals-are-zero mode flag* turns all numbers which would be
1469-
/// denormalized (exponent bits are all zeros) into zeros.
1467+
/// denormalized (exponent bits are all zeros) into zeros.
14701468
///
14711469
/// Note that modifying the masking flags, rounding mode, or denormals-are-zero mode flags leads to
14721470
/// **immediate Undefined Behavior**: Rust assumes that these are always in their default state and
@@ -1489,14 +1487,12 @@ pub unsafe fn _mm_getcsr() -> u32 {
14891487
/// * `_MM_EXCEPT_DIV_ZERO`: Division by zero occurred.
14901488
///
14911489
/// * `_MM_EXCEPT_OVERFLOW`: A numeric overflow exception occurred, i.e., a
1492-
/// result was too large to be represented (e.g., an `f32` with absolute
1493-
/// value
1494-
/// greater than `2^128`).
1490+
/// result was too large to be represented (e.g., an `f32` with absolute
1491+
/// value greater than `2^128`).
14951492
///
14961493
/// * `_MM_EXCEPT_UNDERFLOW`: A numeric underflow exception occurred, i.e., a
1497-
/// result was too small to be represented in a normalized way (e.g., an
1498-
/// `f32`
1499-
/// with absulte value smaller than `2^-126`.)
1494+
/// result was too small to be represented in a normalized way (e.g., an
1495+
/// `f32` with absolute value smaller than `2^-126`.)
15001496
///
15011497
/// * `_MM_EXCEPT_INEXACT`: An inexact-result exception occurred (a.k.a.
15021498
/// precision exception). This means some precision was lost due to rounding.
@@ -1829,7 +1825,7 @@ pub const _MM_HINT_ET1: i32 = 6;
18291825
/// * [`_MM_HINT_T1`](constant._MM_HINT_T1.html): Fetch into L2 and higher.
18301826
///
18311827
/// * [`_MM_HINT_T2`](constant._MM_HINT_T2.html): Fetch into L3 and higher or
1832-
/// an implementation-specific choice (e.g., L2 if there is no L3).
1828+
/// an implementation-specific choice (e.g., L2 if there is no L3).
18331829
///
18341830
/// * [`_MM_HINT_NTA`](constant._MM_HINT_NTA.html): Fetch data using the
18351831
/// non-temporal access (NTA) hint. It may be a place closer than main memory

crates/core_arch/src/x86/sse41.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,14 @@ pub unsafe fn _mm_extract_epi32<const IMM8: i32>(a: __m128i) -> i32 {
242242
/// - `11`: Selects bits `[127:96]` from operand `b`.
243243
///
244244
/// * Bits `[5:4]` specify the bits in the result to which the selected bits
245-
/// from operand `b` are copied:
245+
/// from operand `b` are copied:
246246
/// - `00`: Copies the selected bits from `b` to result bits `[31:0]`.
247247
/// - `01`: Copies the selected bits from `b` to result bits `[63:32]`.
248248
/// - `10`: Copies the selected bits from `b` to result bits `[95:64]`.
249249
/// - `11`: Copies the selected bits from `b` to result bits `[127:96]`.
250250
///
251251
/// * Bits `[3:0]`: If any of these bits are set, the corresponding result
252-
/// element is cleared.
252+
/// element is cleared.
253253
///
254254
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_insert_ps)
255255
#[inline]

crates/core_arch/src/x86_64/abm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
//! The references are:
66
//!
77
//! - [Intel 64 and IA-32 Architectures Software Developer's Manual Volume 2:
8-
//! Instruction Set Reference, A-Z][intel64_ref].
8+
//! Instruction Set Reference, A-Z][intel64_ref].
99
//! - [AMD64 Architecture Programmer's Manual, Volume 3: General-Purpose and
10-
//! System Instructions][amd64_ref].
10+
//! System Instructions][amd64_ref].
1111
//!
1212
//! [Wikipedia][wikipedia_bmi] provides a quick overview of the instructions
1313
//! available.

crates/core_arch/src/x86_64/avx.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
//! The references are:
44
//!
55
//! - [Intel 64 and IA-32 Architectures Software Developer's Manual Volume 2:
6-
//! Instruction Set Reference, A-Z][intel64_ref]. - [AMD64 Architecture
7-
//! Programmer's Manual, Volume 3: General-Purpose and System
8-
//! Instructions][amd64_ref].
6+
//! Instruction Set Reference, A-Z][intel64_ref]. - [AMD64 Architecture
7+
//! Programmer's Manual, Volume 3: General-Purpose and System
8+
//! Instructions][amd64_ref].
99
//!
1010
//! [Wikipedia][wiki] provides a quick overview of the instructions available.
1111
//!

0 commit comments

Comments
 (0)