summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-06-26 12:19:59 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-06-24 06:33:30 +0000
commita42d5bf0064e8c8ce50b22abe13bb6eed4ea9dac (patch)
treed93a75c20c326c8e4f66bc18ba0d3ede4b7e6596
parent64f5fe2796c5d20e0b1069837cac269f4aade331 (diff)
parent410ae2fe8e5d78cbce7b20be87828c5595e76842 (diff)
downloadsystem_core-a42d5bf0064e8c8ce50b22abe13bb6eed4ea9dac.zip
system_core-a42d5bf0064e8c8ce50b22abe13bb6eed4ea9dac.tar.gz
system_core-a42d5bf0064e8c8ce50b22abe13bb6eed4ea9dac.tar.bz2
Merge "pixelflinger: Use pointer arithmetic to determine cache flush parameters"
-rw-r--r--libpixelflinger/codeflinger/CodeCache.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libpixelflinger/codeflinger/CodeCache.cpp b/libpixelflinger/codeflinger/CodeCache.cpp
index 8afe0a9..cfd2b37 100644
--- a/libpixelflinger/codeflinger/CodeCache.cpp
+++ b/libpixelflinger/codeflinger/CodeCache.cpp
@@ -201,9 +201,9 @@ int CodeCache::cache( const AssemblyKeyBase& keyBase,
mCacheInUse += assemblySize;
mWhen++;
// synchronize caches...
- const long base = long(assembly->base());
- const long curr = base + long(assembly->size());
- __builtin___clear_cache((void*)base, (void*)curr);
+ void* base = assembly->base();
+ void* curr = (uint8_t*)base + assembly->size();
+ __builtin___clear_cache(base, curr);
}
pthread_mutex_unlock(&mLock);