Skip to content

Commit aa268cd

Browse files
authored
Update README.md
1 parent b0c8da3 commit aa268cd

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,26 @@ Frequency 0 hz
7070
We have Streaming SIMD 2 Extensions
7171
```
7272

73+
# usage
74+
75+
The `cpuid.CPU` provides access to CPU features. Use `cpuid.CPU.Supports()` to access CPU features.
76+
77+
Note that for some cpu/os combinations some features will not be detected.
78+
`amd64` has rather good support and should work reliably on all platforms.
79+
80+
Note that hypervisors may not pass through all CPU features.
81+
7382
## ARM64 feature detection
7483

7584
Not all operating systems provide ARM features directly
7685
and there is no safe way to do so for the rest.
7786

78-
However, a `DetectARM()` can be used if you are able to control your deployment,
79-
it will detect CPU features.
80-
Otherwise a flag for detecting unsafe ARM features can be added. See below.
87+
Currently `arm64/linux` and `arm64/freebsd` should be quite reliable.
88+
`arm64/darwin` adds features expected from the M1 processor, but a lot remains undetected.
89+
90+
A `DetectARM()` can be used if you are able to control your deployment,
91+
it will detect CPU features, but may crash if the OS doesn't intercept the calls.
92+
A `-cpu.arm` flag for detecting unsafe ARM features can be added. See below.
8193

8294
Note that currently only features are detected on ARM,
8395
no additional information is currently available.

0 commit comments

Comments
 (0)