[llvm] r182603 - ARM: implement @llvm.readcyclecounter intrinsic
Tim Northover
t.p.northover at gmail.com
Fri May 24 15:44:59 PDT 2013
> What I meant was that having an intrinsic to test for support would also be
> useful.
Yep, I understood. But the intrinsic you suggest doesn't really solve
the problem (I think). For example if you were compiling a kernel
module your code would be running at a higher privilege level and the
MRC would be actively misleading.
Now, you could say that all kernel code must be compiled with an
arm-none-eabi compiler, or with a special override which assumes
higher privilege and always returns 1 for __has_cyclecounter (or
whatever), but I think that's worse than the current situation of
requiring a degree of competence of our users.
I probably wouldn't oppose such a builtin, but I don't think
implementing it is a good use of time.
> Are there any OSes that ship with this turned on for user-mode by default?
Well, X86 Linux certainly (though I'm not sure the architecture gives
it the option). My experience outside Linux (X86 & ARM) is rather
limited at the moment.
Tim.
More information about the llvm-commits
mailing list