diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-30 11:37:48 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-30 11:38:52 +0200 |
commit | 89e2486a48b739f8d771d69ede5a6a1b244a10fc (patch) | |
tree | 503b1a7812cf97d93704c32437eb5f62dc1a1ff9 /Source/JavaScriptCore/assembler/ARMAssembler.h | |
parent | 625f028249cb37c55bbbd153f3902afd0b0756d9 (diff) | |
download | qtwebkit-89e2486a48b739f8d771d69ede5a6a1b244a10fc.tar.gz |
Imported WebKit commit 0282df8ca7c11d8c8a66ea18543695c69f545a27 (http://svn.webkit.org/repository/webkit/trunk@124002)
New snapshot with prospective Mountain Lion build fix
Diffstat (limited to 'Source/JavaScriptCore/assembler/ARMAssembler.h')
-rw-r--r-- | Source/JavaScriptCore/assembler/ARMAssembler.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/Source/JavaScriptCore/assembler/ARMAssembler.h b/Source/JavaScriptCore/assembler/ARMAssembler.h index a0d7d27c3..87aed853e 100644 --- a/Source/JavaScriptCore/assembler/ARMAssembler.h +++ b/Source/JavaScriptCore/assembler/ARMAssembler.h @@ -817,11 +817,11 @@ namespace JSC { // Read pointers static void* readPointer(void* from) { - ARMWord* insn = reinterpret_cast<ARMWord*>(from); - ARMWord* addr = getLdrImmAddress(insn); - return *reinterpret_cast<void**>(addr); + ARMWord* instruction = reinterpret_cast<ARMWord*>(from); + ARMWord* address = getLdrImmAddress(instruction); + return *reinterpret_cast<void**>(address); } - + // Patch pointers static void linkPointer(void* code, AssemblerLabel from, void* to) @@ -829,14 +829,20 @@ namespace JSC { patchPointerInternal(reinterpret_cast<intptr_t>(code) + from.m_offset, to); } - static void repatchInt32(void* from, int32_t to) + static void repatchInt32(void* where, int32_t to) { - patchPointerInternal(reinterpret_cast<intptr_t>(from), reinterpret_cast<void*>(to)); + patchPointerInternal(reinterpret_cast<intptr_t>(where), reinterpret_cast<void*>(to)); } - + static void repatchCompact(void* where, int32_t value) { - repatchInt32(where, value); + ARMWord* instruction = reinterpret_cast<ARMWord*>(where); + ASSERT((*instruction & 0x0f700000) == LoadUint32); + if (value >= 0) + *instruction = (*instruction & 0xff7ff000) | DT_UP | value; + else + *instruction = (*instruction & 0xff7ff000) | -value; + cacheFlush(instruction, sizeof(ARMWord)); } static void repatchPointer(void* from, void* to) |