From 89e2486a48b739f8d771d69ede5a6a1b244a10fc Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 30 Jul 2012 11:37:48 +0200 Subject: Imported WebKit commit 0282df8ca7c11d8c8a66ea18543695c69f545a27 (http://svn.webkit.org/repository/webkit/trunk@124002) New snapshot with prospective Mountain Lion build fix --- Source/JavaScriptCore/assembler/ARMAssembler.h | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'Source/JavaScriptCore/assembler/ARMAssembler.h') 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(from); - ARMWord* addr = getLdrImmAddress(insn); - return *reinterpret_cast(addr); + ARMWord* instruction = reinterpret_cast(from); + ARMWord* address = getLdrImmAddress(instruction); + return *reinterpret_cast(address); } - + // Patch pointers static void linkPointer(void* code, AssemblerLabel from, void* to) @@ -829,14 +829,20 @@ namespace JSC { patchPointerInternal(reinterpret_cast(code) + from.m_offset, to); } - static void repatchInt32(void* from, int32_t to) + static void repatchInt32(void* where, int32_t to) { - patchPointerInternal(reinterpret_cast(from), reinterpret_cast(to)); + patchPointerInternal(reinterpret_cast(where), reinterpret_cast(to)); } - + static void repatchCompact(void* where, int32_t value) { - repatchInt32(where, value); + ARMWord* instruction = reinterpret_cast(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) -- cgit v1.2.1