How to access ARM system registers?

I want to retrieve processor features at runtime. I used 'MRS' instruction to access system registers. But it failed on my M1 MacBook. I tried the same code on Nvidia Orin(ARM ISA), it's works. On MacOS, I found only 'NZCV' system register I can access. Does Apple impose limitation on other system registers?

Why are you trying to access CPU register directly? Which specific bit of info are you trying to get?

In the vast majority of cases the information you might find there is covered by an API, and it’s generally better to access it through an API because that continues to work as our CPUs evolve.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

How to access ARM system registers?
 
 
Q