You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expose the `__cpuid` and `_xgetby` `x86`/`x86_64` intrinsics.
The `__cpuid` and `__cpuid_count` intrinsics are not available on all
`x86` CPUs. The `has_cpuid() -> bool` intrinsic detect this on non
`x86_64` hosts. For convenience, this is exposed on `x86_64` as well
but there it always returns `true`. These are exposed by Clang and
GCC.
The `__readeflags` and `__writeeflags` intrinsics, which read/write
the `EFLAGS` register and are required to implement `has_cpuid`, are
exposed as well. GCC and Clang exposes them too.
When doing run-time feature detection for `x86`/`x86_64` we
now properly check whether the `cpuid` instruction is
available before using it. If it is not available,
are features are exposes as "not available".
One TODO:
- The `_xgetbv` intrinsic requires the `xsave` target feature
but this is not currently exposed by rustc, see #167 .
0 commit comments