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
Even if the user wants to enable features at compile time or not, it's helpful as an extra sanity check to be able to check at program start that the features really are available and maybe print an error message or something if the actual CPU isn't ready to handle what you're doing.
If a leaf has sub-leaves you need to know the max of, call __get_cpuid_max(leaf) and check ret.1 for that max.
once you know your limits, particular features can be checked for by getting the info for a leaf and checking the bits of a particular return register. Which bit you need to look for in what register in what leaf is mostly covered in the CPUID wikipedia article.
The text was updated successfully, but these errors were encountered:
Lokathor
changed the title
Let the user perform runtime checks for CPU features
[cpuid] Let the user perform runtime checks for CPU features
May 15, 2020
Even if the user wants to enable features at compile time or not, it's helpful as an extra sanity check to be able to check at program start that the features really are available and maybe print an error message or something if the actual CPU isn't ready to handle what you're doing.
ret.0
for the max leaf.__get_cpuid_max(leaf)
and checkret.1
for that max.The text was updated successfully, but these errors were encountered: