Skip to main content

core/stdarch/crates/core_arch/src/x86_64/
mod.rs

1//! `x86_64` intrinsics
2
3#[macro_use]
4mod macros;
5
6// Any 1024-byte vector should work
7type Tile = crate::core_arch::simd::Simd<u8, 1024>;
8
9/// A tile register, used by AMX instructions.
10///
11/// This type is the same as the `__tile1024i` type defined by Intel, representing a 1024-byte tile register.
12/// Usage of this type typically corresponds to the `amx-tile` and up target features for x86_64.
13///
14/// This struct contains the tile configuration information as well as the tile itself.
15/// The tile configuration information consists of the row count and the size of each column in bytes,
16/// with `row * colsb` never exceeding 1024.
17///
18/// The typical usage pattern looks like
19/// ```ignore
20/// let tile = MaybeUninit::uninit();
21/// let tile_ptr = tile.as_mut_ptr();
22///
23/// (*tile_ptr).rows = rows;
24/// (*tile_ptr).colsb = colsb;
25/// __tile_zero(tile_ptr);
26///
27/// let tile = tile.assume_init();
28/// ```
29/// Most intrinsics using `__tile1024i` (except for the store intrinsics) have a destination parameter
30/// of type `*mut __tile1024i`, and it expects the `rows` and `colsb` fields of the destination
31/// to be initialized. After the function call, the whole struct can be assumed to be initialized.
32/// Moreover, for dot-product intrinsics, it is UB if the shape of two operands are not compatible
33/// as a matrix product or if the shape of the destination doesn't match the expected shape.
34#[derive(Copy, Clone, Debug)]
35#[allow(non_camel_case_types)]
36#[unstable(feature = "x86_amx_intrinsics", issue = "126622")]
37pub struct __tile1024i {
38    pub rows: u16,
39    pub colsb: u16,
40    tile: Tile,
41}
42
43mod fxsr;
44#[stable(feature = "simd_x86", since = "1.27.0")]
45pub use self::fxsr::*;
46
47mod sse;
48#[stable(feature = "simd_x86", since = "1.27.0")]
49pub use self::sse::*;
50
51mod sse2;
52#[stable(feature = "simd_x86", since = "1.27.0")]
53pub use self::sse2::*;
54
55mod sse41;
56#[stable(feature = "simd_x86", since = "1.27.0")]
57pub use self::sse41::*;
58
59mod sse42;
60#[stable(feature = "simd_x86", since = "1.27.0")]
61pub use self::sse42::*;
62
63mod xsave;
64#[stable(feature = "simd_x86", since = "1.27.0")]
65pub use self::xsave::*;
66
67mod abm;
68#[stable(feature = "simd_x86", since = "1.27.0")]
69pub use self::abm::*;
70
71mod avx;
72#[stable(feature = "simd_x86", since = "1.27.0")]
73pub use self::avx::*;
74
75mod bmi;
76#[stable(feature = "simd_x86", since = "1.27.0")]
77pub use self::bmi::*;
78mod bmi2;
79#[stable(feature = "simd_x86", since = "1.27.0")]
80pub use self::bmi2::*;
81
82mod tbm;
83#[stable(feature = "simd_x86", since = "1.27.0")]
84pub use self::tbm::*;
85
86mod avx512f;
87#[stable(feature = "stdarch_x86_avx512", since = "1.89")]
88pub use self::avx512f::*;
89
90mod avx512bw;
91#[stable(feature = "stdarch_x86_avx512", since = "1.89")]
92pub use self::avx512bw::*;
93
94mod bswap;
95#[stable(feature = "simd_x86", since = "1.27.0")]
96pub use self::bswap::*;
97
98mod rdrand;
99#[stable(feature = "simd_x86", since = "1.27.0")]
100pub use self::rdrand::*;
101
102mod cmpxchg16b;
103#[stable(feature = "cmpxchg16b_intrinsic", since = "1.67.0")]
104pub use self::cmpxchg16b::*;
105
106mod adx;
107#[stable(feature = "simd_x86_adx", since = "1.33.0")]
108pub use self::adx::*;
109
110mod bt;
111#[stable(feature = "simd_x86_bittest", since = "1.55.0")]
112pub use self::bt::*;
113
114mod avx512fp16;
115#[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")]
116pub use self::avx512fp16::*;
117
118mod amx;
119#[unstable(feature = "x86_amx_intrinsics", issue = "126622")]
120pub use self::amx::*;
121
122mod movrs;
123#[unstable(feature = "movrs_target_feature", issue = "137976")]
124pub use self::movrs::*;