]> git.proxmox.com Git - rustc.git/blame - src/tools/rustfmt/tests/source/cfg_if/detect/arch/mips64.rs
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / rustfmt / tests / source / cfg_if / detect / arch / mips64.rs
CommitLineData
f20569fa
XL
1//! Run-time feature detection on MIPS64.
2
3/// Checks if `mips64` feature is enabled.
4#[macro_export]
5#[unstable(feature = "stdsimd", issue = "27731")]
6#[allow_internal_unstable(stdsimd_internal,stdsimd)]
7macro_rules! is_mips64_feature_detected {
8 ("msa") => {
9 cfg!(target_feature = "msa") ||
10 $crate::detect::check_for($crate::detect::Feature::msa)
11 };
12 ($t:tt,) => {
13 is_mips64_feature_detected!($t);
14 };
15 ($t:tt) => { compile_error!(concat!("unknown mips64 target feature: ", $t)) };
16}
17
18/// MIPS64 CPU Feature enum. Each variant denotes a position in a bitset
19/// for a particular feature.
20///
21/// PLEASE: do not use this, it is an implementation detail subject to change.
22#[doc(hidden)]
23#[allow(non_camel_case_types)]
24#[repr(u8)]
25#[unstable(feature = "stdsimd_internal", issue = "0")]
26pub enum Feature {
27 /// MIPS SIMD Architecture (MSA)
28 msa,
29}