Changeset 55500 in webkit for trunk/JavaScriptCore/jit/ExecutableAllocator.h
- Timestamp:
- Mar 3, 2010, 7:57:34 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/ExecutableAllocator.h
r52822 r55500 44 44 #endif 45 45 46 #if CPU(MIPS) && OS(LINUX) 47 #include <sys/cachectl.h> 48 #endif 49 46 50 #if OS(WINCE) 47 51 // From pkfuncs.h (private header file from the Platform Builder) … … 190 194 static void cacheFlush(void*, size_t) 191 195 { 196 } 197 #elif CPU(MIPS) 198 static void cacheFlush(void* code, size_t size) 199 { 200 #if COMPILER(GCC) && (GCC_VERSION >= 40300) 201 #if WTF_MIPS_ISA_REV(2) && (GCC_VERSION < 40403) 202 int lineSize; 203 asm("rdhwr %0, $1" : "=r" (lineSize)); 204 // 205 // Modify "start" and "end" to avoid GCC 4.3.0-4.4.2 bug in 206 // mips_expand_synci_loop that may execute synci one more time. 207 // "start" points to the fisrt byte of the cache line. 208 // "end" points to the last byte of the line before the last cache line. 209 // Because size is always a multiple of 4, this is safe to set 210 // "end" to the last byte. 211 // 212 intptr_t start = reinterpret_cast<intptr_t>(code) & (-lineSize); 213 intptr_t end = ((reinterpret_cast<intptr_t>(code) + size - 1) & (-lineSize)) - 1; 214 __builtin___clear_cache(reinterpret_cast<char*>(start), reinterpret_cast<char*>(end)); 215 #else 216 intptr_t end = reinterpret_cast<intptr_t>(code) + size; 217 __builtin___clear_cache(reinterpret_cast<char*>(code), reinterpret_cast<char*>(end)); 218 #endif 219 #else 220 _flush_cache(reinterpret_cast<char*>(code), size, BCACHE); 221 #endif 192 222 } 193 223 #elif CPU(ARM_THUMB2) && OS(IPHONE_OS)
Note:
See TracChangeset
for help on using the changeset viewer.