diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-24 17:03:20 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-24 17:03:20 +0200 |
commit | 08d4a74d56ca431877819fc4566e27eafe150342 (patch) | |
tree | ebd8530838ab390c015c6b7e659a22852c1663ae /Source/JavaScriptCore/assembler/ARMv7Assembler.h | |
parent | 1de6cd4794bbd5a52189384189a2b8df1848b39b (diff) | |
download | qtwebkit-08d4a74d56ca431877819fc4566e27eafe150342.tar.gz |
Imported WebKit commit 0fbd41c4e13f5a190faf160bf993eee614e6e18e (http://svn.webkit.org/repository/webkit/trunk@123477)
New snapshot that adapts to latest Qt API changes
Diffstat (limited to 'Source/JavaScriptCore/assembler/ARMv7Assembler.h')
-rw-r--r-- | Source/JavaScriptCore/assembler/ARMv7Assembler.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/Source/JavaScriptCore/assembler/ARMv7Assembler.h b/Source/JavaScriptCore/assembler/ARMv7Assembler.h index 96c4f096c..e9b9fcc50 100644 --- a/Source/JavaScriptCore/assembler/ARMv7Assembler.h +++ b/Source/JavaScriptCore/assembler/ARMv7Assembler.h @@ -2095,11 +2095,24 @@ public: setInt32(where, value); } - static void repatchCompact(void* where, int32_t value) + static void repatchCompact(void* where, int32_t offset) { - ASSERT(value >= 0); - ASSERT(ARMThumbImmediate::makeUInt12(value).isUInt7()); - setUInt7ForLoad(where, ARMThumbImmediate::makeUInt12(value)); + ASSERT(offset >= -255 && offset <= 255); + + bool add = true; + if (offset < 0) { + add = false; + offset = -offset; + } + + offset |= (add << 9); + offset |= (1 << 10); + offset |= (1 << 11); + + uint16_t* location = reinterpret_cast<uint16_t*>(where); + location[1] &= ~((1 << 12) - 1); + location[1] |= offset; + cacheFlush(location, sizeof(uint16_t) * 2); } static void repatchPointer(void* where, void* value) |