1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! Intrinsics for the [`x86_64`](https://en.wikipedia.org/wiki/X86-64) processor family.

use super::*;

use core::arch::x86_64::*;

unsafe impl Zeroable for __m128i {}
unsafe impl Zeroable for __m128 {}
unsafe impl Zeroable for __m128d {}
unsafe impl Zeroable for __m256i {}
unsafe impl Zeroable for __m256 {}
unsafe impl Zeroable for __m256d {}

unsafe impl Pod for __m128i {}
unsafe impl Pod for __m128 {}
unsafe impl Pod for __m128d {}
unsafe impl Pod for __m256i {}
unsafe impl Pod for __m256 {}
unsafe impl Pod for __m256d {}

#[cfg(target_feature = "sse")]
#[path = "sse.rs"]
mod sse;
#[cfg(target_feature = "sse")]
pub use sse::*;

#[cfg(target_feature = "sse2")]
#[path = "sse2.rs"]
mod sse2;
#[cfg(target_feature = "sse2")]
pub use sse2::*;

#[cfg(target_feature = "sse3")]
#[path = "sse3.rs"]
mod sse3;
#[cfg(target_feature = "sse3")]
pub use sse3::*;

#[cfg(target_feature = "rdrand")]
#[path = "rdrand.rs"]
mod rdrand;
#[cfg(target_feature = "rdrand")]
pub use rdrand::*;

/// As [`_rdtsc`](https://doc.rust-lang.org/core/arch/x86_64/fn._rdtsc.html).
#[inline]
pub fn rdtsc() -> u64 {
  unsafe { _rdtsc() }
}