summaryrefslogtreecommitdiff
path: root/libartbase/base/utils.h
diff options
context:
space:
mode:
author Orion Hodson <oth@google.com> 2018-09-07 09:46:08 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-09-07 09:46:08 +0000
commit98ca6b584251ae53a695da2fca304de0506fbdfc (patch)
tree615c9f84bae9de7ea22a4a03de4bc9f7aad3d2c2 /libartbase/base/utils.h
parentcf48a8ba490fa6244648f615c2d3c417fb42e05f (diff)
parentf233136f2ca25316643b7f409df7af55a762f98a (diff)
Merge "ART: Add FlushInstructionPipeline()"
Diffstat (limited to 'libartbase/base/utils.h')
-rw-r--r--libartbase/base/utils.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/libartbase/base/utils.h b/libartbase/base/utils.h
index ba61e1b0a3..44499415f8 100644
--- a/libartbase/base/utils.h
+++ b/libartbase/base/utils.h
@@ -179,16 +179,19 @@ static T GetRandomNumber(T min, T max) {
// Sleep forever and never come back.
NO_RETURN void SleepForever();
-inline void FlushInstructionCache(char* begin, char* end) {
- __builtin___clear_cache(begin, end);
-}
-
inline void FlushDataCache(char* begin, char* end) {
// Same as FlushInstructionCache for lack of other builtin. __builtin___clear_cache
// flushes both caches.
__builtin___clear_cache(begin, end);
}
+inline void FlushInstructionCache(char* begin, char* end) {
+ __builtin___clear_cache(begin, end);
+}
+
+// Flush instruction pipeline. Returns true on success, false if feature is unsupported.
+bool FlushInstructionPipeline();
+
template <typename T>
constexpr PointerSize ConvertToPointerSize(T any) {
if (any == 4 || any == 8) {