Macro std::arch::is_aarch64_feature_detected

1.60.0 · source ·
macro_rules! is_aarch64_feature_detected {
    ("neon") => { ... };
    ("pmull") => { ... };
    ("fp") => { ... };
    ("fp16") => { ... };
    ("sve") => { ... };
    ("crc") => { ... };
    ("lse") => { ... };
    ("lse2") => { ... };
    ("rdm") => { ... };
    ("rcpc") => { ... };
    ("rcpc2") => { ... };
    ("dotprod") => { ... };
    ("tme") => { ... };
    ("fhm") => { ... };
    ("dit") => { ... };
    ("flagm") => { ... };
    ("ssbs") => { ... };
    ("sb") => { ... };
    ("paca") => { ... };
    ("pacg") => { ... };
    ("dpb") => { ... };
    ("dpb2") => { ... };
    ("sve2") => { ... };
    ("sve2-aes") => { ... };
    ("sve2-sm4") => { ... };
    ("sve2-sha3") => { ... };
    ("sve2-bitperm") => { ... };
    ("frintts") => { ... };
    ("i8mm") => { ... };
    ("f32mm") => { ... };
    ("f64mm") => { ... };
    ("bf16") => { ... };
    ("rand") => { ... };
    ("bti") => { ... };
    ("mte") => { ... };
    ("jsconv") => { ... };
    ("fcma") => { ... };
    ("aes") => { ... };
    ("sha2") => { ... };
    ("sha3") => { ... };
    ("sm4") => { ... };
    ("asimd") => { ... };
    ("ras") => { ... };
    ("v8.1a") => { ... };
    ("v8.2a") => { ... };
    ("v8.3a") => { ... };
    ("v8.4a") => { ... };
    ("v8.5a") => { ... };
    ("v8.6a") => { ... };
    ("v8.7a") => { ... };
    ($t:tt,) => { ... };
    ($t:tt) => { ... };
}
Available on AArch64 or target_arch="arm64ec" only.
Expand description

This macro tests, at runtime, whether an aarch64 feature is enabled on aarch64 platforms. Currently most features are only supported on linux-based platforms.

This macro takes one argument which is a string literal of the feature being tested for. The feature names are mostly taken from their FEAT_* definitions in the ARM Architecture Reference Manual.

§Supported arguments

  • "asimd" or “neon” - FEAT_AdvSIMD
  • "pmull" - FEAT_PMULL
  • "fp" - FEAT_FP
  • "fp16" - FEAT_FP16
  • "sve" - FEAT_SVE
  • "crc" - FEAT_CRC
  • "lse" - FEAT_LSE
  • "lse2" - FEAT_LSE2
  • "rdm" - FEAT_RDM
  • "rcpc" - FEAT_LRCPC
  • "rcpc2" - FEAT_LRCPC2
  • "dotprod" - FEAT_DotProd
  • "tme" - FEAT_TME
  • "fhm" - FEAT_FHM
  • "dit" - FEAT_DIT
  • "flagm" - FEAT_FLAGM
  • "ssbs" - FEAT_SSBS & FEAT_SSBS2
  • "sb" - FEAT_SB
  • "paca" - FEAT_PAuth (address authentication)
  • "pacg" - FEAT_Pauth (generic authentication)
  • "dpb" - FEAT_DPB
  • "dpb2" - FEAT_DPB2
  • "sve2" - FEAT_SVE2
  • "sve2-aes" - FEAT_SVE2_AES
  • "sve2-sm4" - FEAT_SVE2_SM4
  • "sve2-sha3" - FEAT_SVE2_SHA3
  • "sve2-bitperm" - FEAT_SVE2_BitPerm
  • "frintts" - FEAT_FRINTTS
  • "i8mm" - FEAT_I8MM
  • "f32mm" - FEAT_F32MM
  • "f64mm" - FEAT_F64MM
  • "bf16" - FEAT_BF16
  • "rand" - FEAT_RNG
  • "bti" - FEAT_BTI
  • "mte" - FEAT_MTE & FEAT_MTE2
  • "jsconv" - FEAT_JSCVT
  • "fcma" - FEAT_FCMA
  • "aes" - FEAT_AES & FEAT_PMULL
  • "sha2" - FEAT_SHA1 & FEAT_SHA256
  • "sha3" - FEAT_SHA512 & FEAT_SHA3
  • "sm4" - FEAT_SM3 & FEAT_SM4