]> granicus.if.org Git - clang/commitdiff
Add caveat to __builtin_readcyclecounter documentation.
authorTim Northover <t.p.northover@gmail.com>
Thu, 23 May 2013 19:14:12 +0000 (19:14 +0000)
committerTim Northover <t.p.northover@gmail.com>
Thu, 23 May 2013 19:14:12 +0000 (19:14 +0000)
The ARM cycle-counter can be restricted by the operating system; it's
worth warning potential users of this issue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182604 91177308-0d34-0410-b5e6-96231b3b80d8

docs/LanguageExtensions.rst

index 0c56d5eda778883a86cf9e25181f5c84375ef201..d7e88dfda9a513d0f7c318a0b7004471a7d5c503 100644 (file)
@@ -1410,7 +1410,9 @@ should only be used for timing small intervals.  When not supported by the
 target, the return value is always zero.  This builtin takes no arguments and
 produces an unsigned long long result.
 
-Query for this feature with ``__has_builtin(__builtin_readcyclecounter)``.
+Query for this feature with ``__has_builtin(__builtin_readcyclecounter)``. Note
+that even if present, its use may depend on run-time privilege or other OS
+controlled state.
 
 .. _langext-__builtin_shufflevector: