diff options
| author | Taiki Endo <te316e89@gmail.com> | 2023-02-12 01:10:11 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-11 16:10:11 +0000 |
| commit | 57c492180ddc964829306997db3f681292f36e17 (patch) | |
| tree | 0d10494d0ab0dc118e2ee566a80316b5c70bda56 /library/stdarch/crates/std_detect | |
| parent | 217a7d106a7b92fb80e95b5670cc9d5435c76cb2 (diff) | |
| download | rust-57c492180ddc964829306997db3f681292f36e17.tar.gz rust-57c492180ddc964829306997db3f681292f36e17.zip | |
std_detect: Update platform support docs (#1380)
Diffstat (limited to 'library/stdarch/crates/std_detect')
| -rw-r--r-- | library/stdarch/crates/std_detect/README.md | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/library/stdarch/crates/std_detect/README.md b/library/stdarch/crates/std_detect/README.md index 82f0c40d338..71f474d658e 100644 --- a/library/stdarch/crates/std_detect/README.md +++ b/library/stdarch/crates/std_detect/README.md @@ -46,17 +46,25 @@ crate from working on applications in which `std` is not available. the operating system. `std_detect` assumes that the binary is an user-space application. If you need raw support for querying `cpuid`, consider using the [`cupid`](https://crates.io/crates/cupid) crate. - -* Linux: - * `arm{32, 64}`, `mips{32,64}{,el}`, `powerpc{32,64}{,le}`: `std_detect` + +* Linux/Android: + * `arm{32, 64}`, `mips{32,64}{,el}`, `powerpc{32,64}{,le}`, `riscv{32,64}`: `std_detect` supports these on Linux by querying ELF auxiliary vectors (using `getauxval` - when available), and if that fails, by querying `/proc/cpuinfo`. + when available), and if that fails, by querying `/proc/cpuinfo`. * `arm64`: partial support for doing run-time feature detection by directly querying `mrs` is implemented for Linux >= 4.11, but not enabled by default. * FreeBSD: + * `arm32`, `powerpc64`: `std_detect` supports these on FreeBSD by querying ELF + auxiliary vectors using `sysctl`. * `arm64`: run-time feature detection is implemented by directly querying `mrs`. +* OpenBSD: + * `arm64`: run-time feature detection is implemented by querying `sysctl`. + +* Windows: + * `arm64`: run-time feature detection is implemented by querying `IsProcessorFeaturePresent`. + # License This project is licensed under either of |
