View Single Post
Old 2020-10-26, 11:53   #4
xilman
Bamboozled!
 
xilman's Avatar
 
"π’‰Ίπ’ŒŒπ’‡·π’†·π’€­"
May 2003
Down not across

28×41 Posts
Default

Quote:
Originally Posted by retina View Post
IMO the only true-and-correctTM method of finding out what one's system can execute is to simply execute an instruction from the set. If you get an exception then you can't use that set.

This it because it isn't just the CPU you are testing for, it is also the OS. If the OS doesn't enable, and support the instruction set you want to use, even if the CPU has it, then you won't be able to execute them. If you get no exception thrown then you are good to go.

And it generalises to all OSes and systems out there. No need to find special files and parse text outputs and whatnot.
I am curious.

Can you give a specific example of an instruction which is supported by the bare metal but which can not be executed because of a restriction imposed by the overlying OS?

This is a genuine question because I have never come across an example before.
xilman is offline   Reply With Quote