Title: [122060] trunk/Source/_javascript_Core
Revision
122060
Author
zherc...@webkit.org
Date
2012-07-08 03:00:04 -0700 (Sun, 08 Jul 2012)

Log Message

[Qt][ARM] Implementing missing macro assembler instructions after r121925
https://bugs.webkit.org/show_bug.cgi?id=90657

Reviewed by Csaba Osztrogonác.

Implementing convertibleLoadPtr, replaceWithLoad and
replaceWithAddressComputation.

* assembler/ARMAssembler.h:
(JSC::ARMAssembler::replaceWithLoad):
(ARMAssembler):
(JSC::ARMAssembler::replaceWithAddressComputation):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::convertibleLoadPtr):
(MacroAssemblerARM):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (122059 => 122060)


--- trunk/Source/_javascript_Core/ChangeLog	2012-07-08 09:04:05 UTC (rev 122059)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-07-08 10:00:04 UTC (rev 122060)
@@ -1,3 +1,21 @@
+2012-07-08  Zoltan Herczeg  <zherc...@webkit.org>
+
+        [Qt][ARM] Implementing missing macro assembler instructions after r121925
+        https://bugs.webkit.org/show_bug.cgi?id=90657
+
+        Reviewed by Csaba Osztrogonác.
+
+        Implementing convertibleLoadPtr, replaceWithLoad and
+        replaceWithAddressComputation.
+
+        * assembler/ARMAssembler.h:
+        (JSC::ARMAssembler::replaceWithLoad):
+        (ARMAssembler):
+        (JSC::ARMAssembler::replaceWithAddressComputation):
+        * assembler/MacroAssemblerARM.h:
+        (JSC::MacroAssemblerARM::convertibleLoadPtr):
+        (MacroAssemblerARM):
+
 2012-07-06  Filip Pizlo  <fpi...@apple.com>
 
         WebKit Version 5.1.7 (6534.57.2, r121935): Double-click no longer works on OpenStreetMap

Modified: trunk/Source/_javascript_Core/assembler/ARMAssembler.h (122059 => 122060)


--- trunk/Source/_javascript_Core/assembler/ARMAssembler.h	2012-07-08 09:04:05 UTC (rev 122059)
+++ trunk/Source/_javascript_Core/assembler/ARMAssembler.h	2012-07-08 10:00:04 UTC (rev 122060)
@@ -908,6 +908,30 @@
             return sizeof(ARMWord) * 2;
         }
 
+        static void replaceWithLoad(void* instructionStart)
+        {
+            ARMWord* instruction = reinterpret_cast<ARMWord*>(instructionStart);
+            cacheFlush(instruction, sizeof(ARMWord));
+
+            ASSERT((*instruction & 0x0ff00000) == 0x02800000 || (*instruction & 0x0ff00000) == 0x05900000);
+            if ((*instruction & 0x0ff00000) == 0x02800000) {
+                 *instruction = (*instruction & 0xf00fffff) | 0x05900000;
+                 cacheFlush(instruction, sizeof(ARMWord));
+            }
+        }
+
+        static void replaceWithAddressComputation(void* instructionStart)
+        {
+            ARMWord* instruction = reinterpret_cast<ARMWord*>(instructionStart);
+            cacheFlush(instruction, sizeof(ARMWord));
+
+            ASSERT((*instruction & 0x0ff00000) == 0x02800000 || (*instruction & 0x0ff00000) == 0x05900000);
+            if ((*instruction & 0x0ff00000) == 0x05900000) {
+                 *instruction = (*instruction & 0xf00fffff) | 0x02800000;
+                 cacheFlush(instruction, sizeof(ARMWord));
+            }
+        }
+
         // Address operations
 
         static void* getRelocatedAddress(void* code, AssemblerLabel label)

Modified: trunk/Source/_javascript_Core/assembler/MacroAssemblerARM.h (122059 => 122060)


--- trunk/Source/_javascript_Core/assembler/MacroAssemblerARM.h	2012-07-08 09:04:05 UTC (rev 122059)
+++ trunk/Source/_javascript_Core/assembler/MacroAssemblerARM.h	2012-07-08 10:00:04 UTC (rev 122060)
@@ -386,6 +386,14 @@
         load16(address, dest);
     }
 
+    ConvertibleLoadLabel convertibleLoadPtr(Address address, RegisterID dest)
+    {
+        ConvertibleLoadLabel result(this);
+        ASSERT(address.offset >= 0 && address.offset <= 255);
+        m_assembler.dtr_u(ARMAssembler::LoadUint32, dest, address.base, address.offset);
+        return result;
+    }
+
     DataLabel32 load32WithAddressOffsetPatch(Address address, RegisterID dest)
     {
         DataLabel32 dataLabel(this);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to