Files
archy/core/target/debug/deps/libcpufeatures-d60aeb7bf337cab7.rmeta
T

70 lines
12 KiB
Plaintext
Raw Normal View History

rust
‡0#rustc 1.93.0 (254b59607 2026-01-19)Á³VOÐêùÿ²?ÑL¼§Ì±-a7a40eb546f9e2b0Áà *Aqu¯™§þI4?»R-ad9e219d1461fd28Áë&Gf·Ã ¬ëñq:¤»b-bb76018b1173caf6Á__detect_target_featuresÁĤØlinuxÁ<ÖœÊØandroidÁLë¬ßüÉ,getauxval_hwcapÁ|ÏØÝœšØö¬¯ü™,__expand_check_macroÁ¤„ Ø Ý œÉ Ø ö ¬Þ üÈ ,hwcapsÁ4áØÝœ«Øö¬Àüª,³Ä‚(Ûl'appleÁ<'¼'ØL¦'Ý<²'œ¦'ØL»'öLÇ'¬»'üŒ'Füˆ'Kë \¿Êë l˜ÜŠØœÊØœéÊÙ´þüè-å
å
³½__unless_target_featuresÁ³checkÁ sysctlbynameÁ 
³¿Ä‘³Ä»
å ôüÔ/üOL This crate provides macros for runtime CPU feature detection. It's intendedÁüPRO as a stopgap until Rust [RFC 2725] adding first-class target feature detectionÁü£'$ macros to `libcore` is implemented.ÁËËüÏ$! # Supported target architecturesÁôËüøKH *NOTE: target features with an asterisk are unstable (nightly-only) andÁüÄIF subject to change to match upstream name changes in the Rust standardÁ library.ÁË„Ÿ
## `aarch64`Á°Ëü´\Y Linux, iOS, and macOS/ARM only (ARM64 does not support OS-independent feature detection)Áˤ• Target features:ÁªË - `aes`*Á
- `sha2`*Á
- `sha3`*Á×Ë Linux onlyÁêË - `sm4`*Áûˤÿ ## `loongarch64`ÁËü˜NK Linux only (LoongArch64 does not support OS-independent feature detection)Áçˤëâ Ëd„ - `lam`*Ád - `ual`*Á - `fpu`*Á - `lsx`*Ál¸
- `lasx`*Á - `crc32`*Á„Õ
- `complex`*Á - `crypto`*Á - `lvz`*Á„ƒ
- `lbt.x86`*Á„”
- `lbt.arm`*ÁŒ¥ - `lbt.mips`*Á - `ptw`*ÁÄË¬È ## `x86`/`x86_64`ÁÞËüâ(% OS independent and `no_std`-friendlyÁË¤â ¤Ë - `adx`Á\´ - `aes`Á - `avx`Á - `avx2`ÁŒÙ - `avx512bw`*ÁŒë - `avx512cd`*ÁŒý - `avx512dq`*ÁŒ  - `avx512er`*Á„¡ 
- `avx512f`*Áœ²  - `avx512ifma`*ÁŒÆ  - `avx512pf`*ÁŒØ  - `avx512vl`*Á - `bmi1`Á - `bmi2`Ád„
 - `fma`,Á\
 - `mmx`ÁŒ
 - `pclmulqdq`Á
 - `popcnt`Á
 - `rdrand`Á
 - `rdseed`Á
 - `sgx`Á
 - `sha`Á
 - `sse`Ád€  - `sse2`Ád  - `sse3`Á  - `sse4.1`Á  - `sse4.2`Ál¸ 
- `ssse3`ÁÆ ËüÊ LI If you would like detection support for a target feature which is not onÁü— 0- this list, please [open a GitHub issue][gh].ÁÈ Ë 
# ExampleÁ  ```Áüâ >; # #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]Á
 # {Áü©
0- // This macro creates `cpuid_aes_sha` moduleÁüÚ
30 cpufeatures::new!(cpuid_aes_sha, "aes", "sha");ÁŽËü’A> // `token` is a Zero Sized Type (ZST) value, which guaranteesÁüÔ?< // that underlying static storage got properly initialized,Áü”1. // which allows to omit initialization branchÁüÆ@= let token: cpuid_aes_sha::InitToken = cpuid_aes_sha::init();Áˤ‹ if token.get() {Áü =: println!("CPU supports both SHA and AES extensions");Á } else {Áüë=: println!("SHA and AES extensions are not supported");Á¯Ëü³@= // If stored value needed only once you can get stored valueÁÌô // omitting the tokenÁüŽ# let val = cpuid_aes_sha::get();Áü²! assert_eq!(val, token.get());ÁÔËüØ41 // Additionally you can get both token and valueÁü1. let (token, val) = cpuid_aes_sha::init_get();Áü¿!Ü # }ÁìñËüõLI Note that if all tested target features are enabled via compiler optionsÁüÂKH (e.g. by using `RUSTFLAGS`), the `get` method will always return `true`ÁüŽC@ and `init` will not use CPUID instruction. Such behavior allowsÁüÒ30 compiler to completely eliminate fallback code.ÁËüŠEB After first call macro caches result and returns it in subsequentÁüÐ52 calls, thus runtime overhead for them is minimal.ÁËüŠ;8 [RFC 2725]: https://github.com/rust-lang/rfcs/pull/2725Áüƃ [gh]: https://github.com/RustCrypto/utils/issues/new?title=cpufeatures:%20requesting%20support%20for%20CHANGEME%20target%20featureÁ¡Ü ß 8 ó7Dhttps://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svgÁüõF$ »8µ„Á Ò7ƒ&üÔFüÙij¿³.å= L»¡ ¤ ®8Æ ¥ ¨ ­8å
ŒŸ»³  Î8Ê Ã7½ü±¡Ó Ö Ý8°ü(% ARM64 CPU feature detection support.Á)Ëü-OL Unfortunately ARM instructions to detect CPU features cannot be called fromÁü}MJ unprivileged userspace code, so this implementation relies on OS-specificÁüË APIs for feature detection.Áü„%¡÷ ú 8°&|å ª ø ° Ë , ± ² ¹, ³8tfÁ´& 8·$ º »*½, À8bodyÁ& Å8ï*Í Ð õ Ú ï+ è é 8¢ê í 8Æ î ñ Ž8àò õ , ö ÷ 8Î , 8ö+ˆ$ Š
Œ, ž8±,+ ± ² Ô8¢³  Ó8à· º Ò, » ¼ Ð8Î Ë, Ì8ö+Í$ Ï
Ñ8 % öü®
%»ñ  ô Œ
8Û ƒ
7÷<…
üï ¡¡
 ¤
«
8°

&|
. Ô
ž  Ú
æ
, Û
 Ü
ã
, Ý
8ö+Þ
& à
8á
$ ä
 å
*è
 ë
 ì
š , ö
 ÷
Ž , ø
8
'þ
8å,€   Š , 8ö+ˆ  Œ 8 $‘ % œ ”ê»­ ° È8Û ¿7÷ü«¡Ý à ç8°&|Ë= ý ! ƒ 7Ù,„* Ž ¡8 % ¢ ¨ ®7ditÁ*° ³ µ8" Ü ¯, ê8'ð8½'ù8ñ  ¥7hw.optional.arm.FEAT_DIT\0Áìˆ%  ¼ Ã7*Å È Û8 % Ü â é7Š*ë î ç 8" ÿ á , Ê8'Ð8½'Ù8ñ ç 7hw.optional.armv8_2_sha512\0Áüè, œ 8, '¢ 8½'« 8ñd­  ¹ × 7hw.optional.armv8_2_sha3\0Áìº % è  î ô 7sm4Á*ö  ù !8 ,ƒ!% Ž!üé!/ü“!52 Apple helper function for calling `sysctlbyname`.Á»Ë! Î! æ!8ÛlÏ! Ý!7÷<ß!üÉ!d÷!  
 Š"
ÿ
$„"„çü¤2/ Create module with CPU feature detection code.Á&|×L ø Ó/ þ ¡ , ÿ8mod_nameÁD€& ˆ8Û,‰$ Ž,   ˜, 8ö+& 8$  š, œ  Ÿ$ ž-  *£ ¦ Ð/8°, ´8ç: ¾ Ê/G8#Ì8³'Ô8Â'Ú8¹'â ä 8]$ í8Õ'÷8û% 8, 8UNINITÁ4 & œ 8¦ž  ¡ 8¦£ '¥ 8 max_valueÁ °  ± % ² 88STORAGEÁ& Î 8] Ù 8]'ã 8 å  è  ï 8Ä=% ð < Initialization tokenÁÄÿ + ¤! ¥! À!84¦! ¬! ¿!8$­!$ ±!8u,³!$ ¸!8,º!8Î!84Ò!8 InitTokenÁLÙ! â! å! ã! ä!% æ!8$õ!8¥@Lú! „" á$
< Get initialized valueÁÌ–"+ À" Á" Ð"8þ4Â" È" Ï"8î4É"8â"8 æ"8getÁé" ì" ò" í"8$î"(ô"8õ$÷" ü" Ó$, #8,“#'˜#8¿Äš# ²# ´# Á$, Î# Ï# Ó#, Ð#8ö+Ñ#$ Ô# Õ#*×# Ú# «$8²><ø# ÿ#8Ù $€$ „$ Œ$8û<…$Ž$7í $<+ Get stored value and initialization token,Áüð$.<+ initializing underlying storage if needed.Áü«%.+ æ% ç% î%8þ4è%8ü%8 €&8init_getÁDƒ& & Œ&(Ž& & ¡&8¥@L&$ &8õ$& £& Ì, 8µ&8resÁ¹& ½&, ¿&8,À&'Å&8¿ÄÇ& ß& á& —,, ÷& ø& ü&, ù&8ö+ú&$ ý& þ&*€' ƒ' …,+ ' ž' £'8á$Ÿ'8 ½'8
init_innerÁTÀ' Ê' Ë'(Í'8õ$Ð' Õ' ¡)8ó'8†F÷' û', ý'8,þ''ƒ(8³Ä…( ( ž( §(, Ÿ(  ( ¤(, ¡(8ö+¢($ ¥( ¦(% ¨(8²><Æ( Í(8,Î( Ó( æ(8†FÔ(8Ø(8¦Û($ Ý(8û<ß(% ç(8†F…)8*8Ÿ* £*8²><¥* ¬*8Ù $­* ±* ¹*8û<²*% º*8Õ*8Ø*Ü*8Ä=4ß* æ* ©+8ÃGT„+ Ž+ +8$«+ °+ ï+8Î+Ò+7í Õ+% ˜, «, ¾,8¥@L¬, µ, ¸, ¶, ·,$ ¹,8†F»,<F Initialize underlying storage if needed and get initialization token.ÁüÛ,I+ ±- ²- ¹-8þ4³-8Ç-8 Ë-8initÁ$Î- Ò- Ó-(Õ-8¥@LØ- â- .8žEDô- ü- ý- þ-7ì ÿ-<> Initialize underlying storage if needed and get stored value.Áüœ.A+ ê. ë. ò.8þ4ì.8€/8 „/8éA‡/ Š/ /(/8õ$/ •/ À/8žED§/ ¯/ °/ ±/7í ²/% Ñ/
 |https://github.com/RustCrypto/utils/issues/new?title=cpufeatures:%20requesting%20support%20for%20CHANGEME%20target%20featureÁ+https://github.com/rust-lang/rfcs/pull/2725Áopen a GitHub issueÁúORFC 2725ÁûP«QÈQûPúOÈQ«QÒkúéÌõ”·ü"§fóm¶õ(]1= ÷u‰sÅ&ŠáÏ~…ߟZzõ>kL¾°M1iëéîëkªT‰± wLàKØÍP¾Zo¾w~f–¼]z×Ä-?Š))) )À.ÍEXÊÐÓ¿):üô'ͽ+·B÷'îäðÎλô}ƒ¦©°´»ÚáíÁ/˜Fø'£½ø°ú°û°Ðü°ý°þ°ìHˈXêE>Ý:£½Ý:£½£½Ü:ïaÝ:ç_ïVé_ Ü:Ë^ Ý:ÙiÙiIterÁÜi÷ ®iÝi
end_or_lenÁ®iÞi_markerÁ®it¸N(Ý:Ì`%ªXÌ`ªXªXåpÝ:×RÝ:ÅUVVÅUïVïV¶J¿Wó°Ý:SÝ:¹ÁÝ:koã ÒkúéÌõ”·šøZÃ`*”ª,[,_,ƒ,s,š,€ODHT
·Þo¾w~f–¼ ªT‰± wü"§fóm¶ŠáÏ~…ߟZ÷u‰sÅ&M1iëéîëkÒkúéÌõ”·õ(]1=› zõ>kL¾°LàKØÍP¾Z^@ÿNÿ-ÿÿÿ5ÿ[X-^@ÿNÿ-ÿÿÿ5ÿ[X-d/Users/dorian/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cpufeatures-0.2.17/src/aarch64.rsÁ ¥þ©¿·½î´ºBZ¦Ë(Ë(§)PN M,(&
61