fn cache(self) -> cache::Initializer {
        let mut value = cache::Initializer::default();
        {
            let mut enable_feature = |f, enable| {
                if enable {
                    value.set(f as u32);
                }
            };

            enable_feature(Feature::fp, self.fp);
            // Half-float support requires float support
            enable_feature(Feature::fp16, self.fp && self.fphp);
            // FHM (fp16fml in LLVM) requires half float support
            enable_feature(Feature::fhm, self.fphp && self.fhm);
            enable_feature(Feature::pmull, self.pmull);
            enable_feature(Feature::crc, self.crc32);
            enable_feature(Feature::lse, self.atomics);
            enable_feature(Feature::lse2, self.uscat);
            enable_feature(Feature::rcpc, self.lrcpc);
            // RCPC2 (rcpc-immo in LLVM) requires RCPC support
            enable_feature(Feature::rcpc2, self.ilrcpc && self.lrcpc);
            enable_feature(Feature::dit, self.dit);
            enable_feature(Feature::flagm, self.flagm);
            enable_feature(Feature::ssbs, self.ssbs);
            enable_feature(Feature::sb, self.sb);
            // FEAT_PAuth provides both paca & pacg
            enable_feature(Feature::pauth, self.paca && self.pacg);
            enable_feature(Feature::dpb, self.dcpop);
            enable_feature(Feature::dpb2, self.dcpodp);
            enable_feature(Feature::rand, self.rng);
            enable_feature(Feature::bti, self.bti);
            enable_feature(Feature::mte, self.mte);
            // jsconv requires float support
            enable_feature(Feature::jsconv, self.jscvt && self.fp);
            enable_feature(Feature::rdm, self.asimdrdm);
            enable_feature(Feature::dotprod, self.asimddp);
            enable_feature(Feature::frintts, self.frint);

            // FEAT_I8MM & FEAT_BF16 also include optional SVE components which linux exposes
            // separately. We ignore that distinction here.
            enable_feature(Feature::i8mm, self.i8mm);
            enable_feature(Feature::bf16, self.bf16);

            // ASIMD support requires float support - if half-floats are
            // supported, it also requires half-float support:
            let asimd = self.fp && self.asimd && (!self.fphp | self.asimdhp);
            enable_feature(Feature::asimd, asimd);
            // ASIMD extensions require ASIMD support:
            enable_feature(Feature::fcma, self.fcma && asimd);
            enable_feature(Feature::sve, self.sve && asimd);

            // SVE extensions require SVE & ASIMD
            enable_feature(Feature::f32mm, self.svef32mm && self.sve && asimd);
            enable_feature(Feature::f64mm, self.svef64mm && self.sve && asimd);

            // Cryptographic extensions require ASIMD
            enable_feature(Feature::aes, self.aes && asimd);
            enable_feature(Feature::sha2, self.sha1 && self.sha2 && asimd);
            // SHA512/SHA3 require SHA1 & SHA256
            enable_feature(
                Feature::sha3,
                self.sha512 && self.sha3 && self.sha1 && self.sha2 && asimd,
            );
            enable_feature(Feature::sm4, self.sm3 && self.sm4 && asimd);

            // SVE2 requires SVE
            let sve2 = self.sve2 && self.sve && asimd;
            enable_feature(Feature::sve2, sve2);
            // SVE2 extensions require SVE2 and crypto features
            enable_feature(Feature::sve2_aes, self.sveaes && sve2 && self.aes);
            enable_feature(
                Feature::sve2_sm4,
                self.svesm4 && sve2 && self.sm3 && self.sm4,
            );
            enable_feature(
                Feature::sve2_sha3,
                self.svesha3 && sve2 && self.sha512 && self.sha3 && self.sha1 && self.sha2,
            );
            enable_feature(Feature::sve2_bitperm, self.svebitperm && self.sve2);
        }
        value
    }
/// Initializes the cache from the feature -bits.
///
/// The feature dependencies here come directly from LLVM's feature definintions:
/// https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/AArch64/AArch64.td
Initializes the cache from the feature -bits.
Initializes the cache from the feature - bits .
fn cache(self) -> cache::Initializer {
        let mut value = cache::Initializer::default();
        {
            let mut enable_feature = |f, enable| {
                if enable {
                    value.set(f as u32);
                }
            };
            enable_feature(Feature::fp, self.fp);
            // Half-float support requires float support
            enable_feature(Feature::fp16, self.fp && self.fphp);
            // FHM (fp16fml in LLVM) requires half float support
            enable_feature(Feature::fhm, self.fphp && self.fhm);
            enable_feature(Feature::pmull, self.pmull);
            enable_feature(Feature::crc, self.crc32);
            enable_feature(Feature::lse, self.atomics);
            enable_feature(Feature::lse2, self.uscat);
            enable_feature(Feature::rcpc, self.lrcpc);
            // RCPC2 (rcpc-immo in LLVM) requires RCPC support
            enable_feature(Feature::rcpc2, self.ilrcpc && self.lrcpc);
            enable_feature(Feature::dit, self.dit);
            enable_feature(Feature::flagm, self.flagm);
            enable_feature(Feature::ssbs, self.ssbs);
            enable_feature(Feature::sb, self.sb);
            // FEAT_PAuth provides both paca & pacg
            enable_feature(Feature::pauth, self.paca && self.pacg);
            enable_feature(Feature::dpb, self.dcpop);
            enable_feature(Feature::dpb2, self.dcpodp);
            enable_feature(Feature::rand, self.rng);
            enable_feature(Feature::bti, self.bti);
            enable_feature(Feature::mte, self.mte);
            // jsconv requires float support
            enable_feature(Feature::jsconv, self.jscvt && self.fp);
            enable_feature(Feature::rdm, self.asimdrdm);
            enable_feature(Feature::dotprod, self.asimddp);
            enable_feature(Feature::frintts, self.frint);
            // FEAT_I8MM & FEAT_BF16 also include optional SVE components which linux exposes
            // separately. We ignore that distinction here.
            enable_feature(Feature::i8mm, self.i8mm);
            enable_feature(Feature::bf16, self.bf16);
            // ASIMD support requires float support - if half-floats are
            // supported, it also requires half-float support:
            let asimd = self.fp && self.asimd && (!self.fphp | self.asimdhp);
            enable_feature(Feature::asimd, asimd);
            // ASIMD extensions require ASIMD support:
            enable_feature(Feature::fcma, self.fcma && asimd);
            enable_feature(Feature::sve, self.sve && asimd);
            // SVE extensions require SVE & ASIMD
            enable_feature(Feature::f32mm, self.svef32mm && self.sve && asimd);
            enable_feature(Feature::f64mm, self.svef64mm && self.sve && asimd);
            // Cryptographic extensions require ASIMD
            enable_feature(Feature::aes, self.aes && asimd);
            enable_feature(Feature::sha2, self.sha1 && self.sha2 && asimd);
            // SHA512/SHA3 require SHA1 & SHA256
            enable_feature(
                Feature::sha3,
                self.sha512 && self.sha3 && self.sha1 && self.sha2 && asimd,
            );
            enable_feature(Feature::sm4, self.sm3 && self.sm4 && asimd);
            // SVE2 requires SVE
            let sve2 = self.sve2 && self.sve && asimd;
            enable_feature(Feature::sve2, sve2);
            // SVE2 extensions require SVE2 and crypto features
            enable_feature(Feature::sve2_aes, self.sveaes && sve2 && self.aes);
            enable_feature(
                Feature::sve2_sm4,
                self.svesm4 && sve2 && self.sm3 && self.sm4,
            );
            enable_feature(
                Feature::sve2_sha3,
                self.svesha3 && sve2 && self.sha512 && self.sha3 && self.sha1 && self.sha2,
            );
            enable_feature(Feature::sve2_bitperm, self.svebitperm && self.sve2);
        }
        value
    }
fn cache ( self ) -> cache :: Initializer { let mut value = cache :: Initializer :: default ( ) ; { let mut enable_feature = | f , enable | { if enable { value . set ( f as u32 ) ; } } ; enable_feature ( Feature :: fp , self . fp ) ; // Half-float support requires float support enable_feature ( Feature :: fp16 , self . fp && self . fphp ) ; // FHM (fp16fml in LLVM) requires half float support enable_feature ( Feature :: fhm , self . fphp && self . fhm ) ; enable_feature ( Feature :: pmull , self . pmull ) ; enable_feature ( Feature :: crc , self . crc32 ) ; enable_feature ( Feature :: lse , self . atomics ) ; enable_feature ( Feature :: lse2 , self . uscat ) ; enable_feature ( Feature :: rcpc , self . lrcpc ) ; // RCPC2 (rcpc-immo in LLVM) requires RCPC support enable_feature ( Feature :: rcpc2 , self . ilrcpc && self . lrcpc ) ; enable_feature ( Feature :: dit , self . dit ) ; enable_feature ( Feature :: flagm , self . flagm ) ; enable_feature ( Feature :: ssbs , self . ssbs ) ; enable_feature ( Feature :: sb , self . sb ) ; // FEAT_PAuth provides both paca & pacg enable_feature ( Feature :: pauth , self . paca && self . pacg ) ; enable_feature ( Feature :: dpb , self . dcpop ) ; enable_feature ( Feature :: dpb2 , self . dcpodp ) ; enable_feature ( Feature :: rand , self . rng ) ; enable_feature ( Feature :: bti , self . bti ) ; enable_feature ( Feature :: mte , self . mte ) ; // jsconv requires float support enable_feature ( Feature :: jsconv , self . jscvt && self . fp ) ; enable_feature ( Feature :: rdm , self . asimdrdm ) ; enable_feature ( Feature :: dotprod , self . asimddp ) ; enable_feature ( Feature :: frintts , self . frint ) ; // FEAT_I8MM & FEAT_BF16 also include optional SVE components which linux exposes // separately. We ignore that distinction here. enable_feature ( Feature :: i8mm , self . i8mm ) ; enable_feature ( Feature :: bf16 , self . bf16 ) ; // ASIMD support requires float support - if half-floats are // supported, it also requires half-float support: let asimd = self . fp && self . asimd && ( ! self . fphp | self . asimdhp ) ; enable_feature ( Feature :: asimd , asimd ) ; // ASIMD extensions require ASIMD support: enable_feature ( Feature :: fcma , self . fcma && asimd ) ; enable_feature ( Feature :: sve , self . sve && asimd ) ; // SVE extensions require SVE & ASIMD enable_feature ( Feature :: f32mm , self . svef32mm && self . sve && asimd ) ; enable_feature ( Feature :: f64mm , self . svef64mm && self . sve && asimd ) ; // Cryptographic extensions require ASIMD enable_feature ( Feature :: aes , self . aes && asimd ) ; enable_feature ( Feature :: sha2 , self . sha1 && self . sha2 && asimd ) ; // SHA512/SHA3 require SHA1 & SHA256 enable_feature ( Feature :: sha3 , self . sha512 && self . sha3 && self . sha1 && self . sha2 && asimd , ) ; enable_feature ( Feature :: sm4 , self . sm3 && self . sm4 && asimd ) ; // SVE2 requires SVE let sve2 = self . sve2 && self . sve && asimd ; enable_feature ( Feature :: sve2 , sve2 ) ; // SVE2 extensions require SVE2 and crypto features enable_feature ( Feature :: sve2_aes , self . sveaes && sve2 && self . aes ) ; enable_feature ( Feature :: sve2_sm4 , self . svesm4 && sve2 && self . sm3 && self . sm4 , ) ; enable_feature ( Feature :: sve2_sha3 , self . svesha3 && sve2 && self . sha512 && self . sha3 && self . sha1 && self . sha2 , ) ; enable_feature ( Feature :: sve2_bitperm , self . svebitperm && self . sve2 ) ; } value }
Initializes the cache from the feature -bits.
Initializes the cache from the feature - bits .
self
self