cpudetect 0.2.0

Ergonomic helpers for CPU feature detection
Documentation
use crate::declare_is_compatible;
use crate::x86_64::features::*;

// In theory, this should always return true for x86_64 CPUs,
// so it is probably not useful, but it is kept here for completeness.
declare_is_compatible!("x86_64", "sse2", "fxsr");

declare_is_compatible!(
    "x86_64_v2",
    "cmpxchg16b",
    "fxsr",
    "popcnt",
    "sse",
    "sse2",
    "sse3",
    "sse4_1",
    "sse4_2",
    "ssse3"
);

declare_is_compatible!(
    "x86_64_v3",
    "avx",
    "avx2",
    "bmi1",
    "bmi2",
    "cmpxchg16b",
    "f16c",
    "fma",
    "fxsr",
    "lzcnt",
    "movbe",
    "popcnt",
    "sse",
    "sse2",
    "sse3",
    "sse4_1",
    "sse4_2",
    "ssse3",
    "xsave"
);

declare_is_compatible!(
    "x86_64_v4",
    "avx",
    "avx2",
    "avx512bw",
    "avx512cd",
    "avx512dq",
    "avx512f",
    "avx512vl",
    "bmi1",
    "bmi2",
    "cmpxchg16b",
    "f16c",
    "fma",
    "fxsr",
    "lzcnt",
    "movbe",
    "popcnt",
    "sse",
    "sse2",
    "sse3",
    "sse4_1",
    "sse4_2",
    "ssse3",
    "xsave"
);