Changeset 118413 in webkit for trunk/Source/JavaScriptCore/assembler/ARMv7Assembler.h
- Timestamp:
- May 24, 2012, 2:14:07 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/assembler/ARMv7Assembler.h
r115363 r118413 2027 2027 linkJumpAbsolute(reinterpret_cast<uint16_t*>(from), to); 2028 2028 2029 ExecutableAllocator::cacheFlush(reinterpret_cast<uint16_t*>(from) - 5, 5 * sizeof(uint16_t));2029 cacheFlush(reinterpret_cast<uint16_t*>(from) - 5, 5 * sizeof(uint16_t)); 2030 2030 } 2031 2031 … … 2070 2070 2071 2071 unsigned debugOffset() { return m_formatter.debugOffset(); } 2072 2073 static void cacheFlush(void* code, size_t size) 2074 { 2075 #if OS(IOS) 2076 sys_cache_control(kCacheFunctionPrepareForExecution, code, size); 2077 #elif OS(LINUX) 2078 asm volatile( 2079 "push {r7}\n" 2080 "mov r0, %0\n" 2081 "mov r1, %1\n" 2082 "movw r7, #0x2\n" 2083 "movt r7, #0xf\n" 2084 "movs r2, #0x0\n" 2085 "svc 0x0\n" 2086 "pop {r7}\n" 2087 : 2088 : "r" (code), "r" (reinterpret_cast<char*>(code) + size) 2089 : "r0", "r1", "r2"); 2090 #elif OS(WINCE) 2091 CacheRangeFlush(code, size, CACHE_SYNC_ALL); 2092 #elif OS(QNX) 2093 #if !ENABLE(ASSEMBLER_WX_EXCLUSIVE) 2094 msync(code, size, MS_INVALIDATE_ICACHE); 2095 #else 2096 UNUSED_PARAM(code); 2097 UNUSED_PARAM(size); 2098 #endif 2099 #else 2100 #error "The cacheFlush support is missing on this platform." 2101 #endif 2102 } 2072 2103 2073 2104 private: … … 2150 2181 location[-1] = twoWordOp5i6Imm4Reg4EncodedImmSecond((location[-1] >> 8) & 0xf, hi16); 2151 2182 2152 ExecutableAllocator::cacheFlush(location - 4, 4 * sizeof(uint16_t));2183 cacheFlush(location - 4, 4 * sizeof(uint16_t)); 2153 2184 } 2154 2185 … … 2178 2209 location[0] &= ~((static_cast<uint16_t>(0x7f) >> 2) << 6); 2179 2210 location[0] |= (imm.getUInt7() >> 2) << 6; 2180 ExecutableAllocator::cacheFlush(location, sizeof(uint16_t));2211 cacheFlush(location, sizeof(uint16_t)); 2181 2212 } 2182 2213
Note:
See TracChangeset
for help on using the changeset viewer.