Changeset 99614 in webkit
- Timestamp:
- Nov 8, 2011 1:57:16 PM (12 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r99608 r99614 1 2011-11-08 Gavin Barraclough <barraclough@apple.com> 2 3 DFG JIT calculation of OSR entry points is not THUMB2 safe 4 https://bugs.webkit.org/show_bug.cgi?id=71852 5 6 Reviewed by Oliver Hunt. 7 8 Executable addresses are tagged with a low bit set to distinguish 9 between THUMB2 and traditional ARM. 10 11 * dfg/DFGJITCompiler.cpp: 12 (JSC::DFG::JITCompiler::exitSpeculativeWithOSR): 13 * dfg/DFGJITCompiler32_64.cpp: 14 (JSC::DFG::JITCompiler::exitSpeculativeWithOSR): 15 * dfg/DFGOSREntry.cpp: 16 (JSC::DFG::prepareOSREntry): 17 * jit/JITCode.h: 18 (JSC::JITCode::executableAddressAtOffset): 19 (JSC::JITCode::start): 20 (JSC::JITCode::size): 21 1 22 2011-11-08 Michael Saboff <msaboff@apple.com> 2 23 -
trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp
r99519 r99614 757 757 ASSERT(mapping->m_bytecodeIndex == returnBytecodeIndex); 758 758 759 void* jumpTarget = reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(baselineCodeBlockForCaller->getJITCode().start()) +mapping->m_machineCodeOffset);759 void* jumpTarget = baselineCodeBlockForCaller->getJITCode().executableAddressAtOffset(mapping->m_machineCodeOffset); 760 760 761 761 GPRReg callerFrameGPR; … … 787 787 ASSERT(mapping->m_bytecodeIndex == exit.m_codeOrigin.bytecodeIndex); 788 788 789 void* jumpTarget = reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(baselineCodeBlock->getJITCode().start()) +mapping->m_machineCodeOffset);789 void* jumpTarget = baselineCodeBlock->getJITCode().executableAddressAtOffset(mapping->m_machineCodeOffset); 790 790 791 791 ASSERT(GPRInfo::regT1 != GPRInfo::cachedResultRegister); -
trunk/Source/JavaScriptCore/dfg/DFGJITCompiler32_64.cpp
r99519 r99614 513 513 ASSERT(mapping->m_bytecodeIndex == returnBytecodeIndex); 514 514 515 void* jumpTarget = reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(baselineCodeBlockForCaller->getJITCode().start()) +mapping->m_machineCodeOffset);515 void* jumpTarget = baselineCodeBlockForCaller->getJITCode().executableAddressAtOffset(mapping->m_machineCodeOffset); 516 516 517 517 GPRReg callerFrameGPR; … … 547 547 ASSERT(mapping->m_bytecodeIndex == exit.m_codeOrigin.bytecodeIndex); 548 548 549 void* jumpTarget = reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(baselineCodeBlock->getJITCode().start()) +mapping->m_machineCodeOffset);549 void* jumpTarget = baselineCodeBlock->getJITCode().executableAddressAtOffset(mapping->m_machineCodeOffset); 550 550 551 551 ASSERT(GPRInfo::regT2 != GPRInfo::cachedResultRegister && GPRInfo::regT2 != GPRInfo::cachedResultRegister2); -
trunk/Source/JavaScriptCore/dfg/DFGOSREntry.cpp
r97408 r99614 139 139 // 4) Find and return the destination machine code address. 140 140 141 void* result = reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(codeBlock->getJITCode().start()) +entry->m_machineCodeOffset);141 void* result = codeBlock->getJITCode().executableAddressAtOffset(entry->m_machineCodeOffset); 142 142 143 143 #if ENABLE(JIT_VERBOSE_OSR) -
trunk/Source/JavaScriptCore/jit/JITCode.h
r95901 r99614 88 88 } 89 89 90 void* executableAddressAtOffset(size_t offset) const 91 { 92 ASSERT(offset < size()); 93 return reinterpret_cast<char*>(m_ref.code().executableAddress()) + offset; 94 } 95 90 96 // This function returns the offset in bytes of 'pointerIntoCode' into 91 97 // this block of code. The pointer provided must be a pointer into this … … 105 111 } 106 112 107 void* start() 113 void* start() const 108 114 { 109 115 return m_ref.code().dataLocation(); 110 116 } 111 117 112 size_t size() 118 size_t size() const 113 119 { 114 120 ASSERT(m_ref.code().executableAddress());
Note: See TracChangeset
for help on using the changeset viewer.