summaryrefslogtreecommitdiffstats
path: root/llvm/docs/LangRef.rst
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2014-03-26 12:52:28 +0000
committerRenato Golin <renato.golin@linaro.org>2014-03-26 12:52:28 +0000
commitc0a3c1d66b479b4e1e72e70d65bbfb2ee66c16f6 (patch)
tree5af7c84d2f3007ac25b226f0c18503db70f08cf3 /llvm/docs/LangRef.rst
parent732f0f73a732a6dbde036003cbaed24ce58c66a5 (diff)
downloadbcm5719-llvm-c0a3c1d66b479b4e1e72e70d65bbfb2ee66c16f6.tar.gz
bcm5719-llvm-c0a3c1d66b479b4e1e72e70d65bbfb2ee66c16f6.zip
Add @llvm.clear_cache builtin
Implementing the LLVM part of the call to __builtin___clear_cache which translates into an intrinsic @llvm.clear_cache and is lowered by each target, either to a call to __clear_cache or nothing at all incase the caches are unified. Updating LangRef and adding some tests for the implemented architectures. Other archs will have to implement the method in case this builtin has to be compiled for it, since the default behaviour is to bail unimplemented. A Clang patch is required for the builtin to be lowered into the llvm intrinsic. This will be done next. llvm-svn: 204802
Diffstat (limited to 'llvm/docs/LangRef.rst')
-rw-r--r--llvm/docs/LangRef.rst30
1 files changed, 30 insertions, 0 deletions
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index c959f56ef11..d18d4ebac90 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -6939,6 +6939,36 @@ is lowered to a constant 0.
Note that runtime support may be conditional on the privilege-level code is
running at and the host platform.
+'``llvm.clear_cache``' Intrinsic
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Syntax:
+"""""""
+
+::
+
+ declare void @llvm.clear_cache(i8*, i8*)
+
+Overview:
+"""""""""
+
+The '``llvm.clear_cache``' intrinsic provides access to the systemcall
+that flushes the cache at the range specified. Some targets need this
+to specifically flush the instruction cache when executable data changes
+in memory (self-modifying code). Other targets have unified intruction
+and data cache, so they don't need any calls.
+
+Semantics:
+""""""""""
+
+When directly supported, this intrinsic will either return a call to
+the appropriate cache clearing system call (usually ``__clear_cache``)
+when the caches are not unified (ARM, Mips) or just remove the call
+altogether when they are (ex. x86_64).
+
+Targets must implement it directly to have either behaviour, as the
+default is to bail with "Not Implemented" message.
+
Standard C Library Intrinsics
-----------------------------
OpenPOWER on IntegriCloud