1//! Run-time feature detection on MIPS.
23#[doc = r" Check for the presence of a CPU feature at runtime."]
#[doc = r""]
#[doc =
r" When the feature is known to be enabled at compile time (e.g. via `-Ctarget-feature`)"]
#[doc = r" the macro expands to `true`."]
#[unstable(feature = "stdarch_mips_feature_detection", issue = "111188")]
#[macro_export]
macro_rules! is_mips_feature_detected {
("msa") =>
{
compile_error!
(concat!
("This macro cannot be used on the current target. You can prevent\n\
it from being used in other architectures by guarding it behind\n\
a `cfg(",
stringify!
(any(target_arch = "mips", target_arch = "mips32r6", target_arch =
"mips64", target_arch = "mips64r6")), ")`."))
}; ($t : tt,) => { crate :: is_mips_feature_detected ! ($t); }; ($t : tt)
=>
{
compile_error!
(concat! ("unknown ", stringify! (mips), " target feature: ", $t))
};
}
#[deny(unexpected_cfgs)]
#[deny(unfulfilled_lint_expectations)]
const _: () = { false; ; };features! {
4 @TARGET: mips;
5 @CFG: any(
6 target_arch = "mips",
7 target_arch = "mips32r6",
8 target_arch = "mips64",
9 target_arch = "mips64r6"
10);
11 @MACRO_NAME: is_mips_feature_detected;
12 @MACRO_ATTRS:
13/// Check for the presence of a CPU feature at runtime.
14 ///
15 /// When the feature is known to be enabled at compile time (e.g. via `-Ctarget-feature`)
16 /// the macro expands to `true`.
17#[unstable(feature = "stdarch_mips_feature_detection", issue = "111188")]
18@FEATURE: #[unstable(feature = "stdarch_mips_feature_detection", issue = "111188")] msa: "msa";
19/// MIPS SIMD Architecture (MSA)
20}