Title: [158915] trunk/Source/_javascript_Core
Revision
158915
Author
[email protected]
Date
2013-11-08 03:22:04 -0800 (Fri, 08 Nov 2013)

Log Message

[arm] Use specific PatchableJump implementation for CPU(ARM_TRADITIONAL).
https://bugs.webkit.org/show_bug.cgi?id=123891

Patch by Julien Brianceau <[email protected]> on 2013-11-08
Reviewed by Michael Saboff.

Although patchableBranch32 is implemented in MacroAssemblerARM.h, the used implementation
is the generic one in MacroAssembler.h. This patch fixes it and also implements the
patchableJump() function for CPU(ARM_TRADITIONAL). These specific implementations are
needed for this architecture backend to ensure that these jumps can be relinked.

* assembler/MacroAssembler.h:
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::patchableJump):
* jit/GPRInfo.h: Remove static_cast that are generating warnings in debug builds.
(JSC::GPRInfo::toIndex):
(JSC::GPRInfo::debugName):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (158914 => 158915)


--- trunk/Source/_javascript_Core/ChangeLog	2013-11-08 10:55:38 UTC (rev 158914)
+++ trunk/Source/_javascript_Core/ChangeLog	2013-11-08 11:22:04 UTC (rev 158915)
@@ -1,3 +1,22 @@
+2013-11-08  Julien Brianceau  <[email protected]>
+
+        [arm] Use specific PatchableJump implementation for CPU(ARM_TRADITIONAL).
+        https://bugs.webkit.org/show_bug.cgi?id=123891
+
+        Reviewed by Michael Saboff.
+
+        Although patchableBranch32 is implemented in MacroAssemblerARM.h, the used implementation
+        is the generic one in MacroAssembler.h. This patch fixes it and also implements the
+        patchableJump() function for CPU(ARM_TRADITIONAL). These specific implementations are
+        needed for this architecture backend to ensure that these jumps can be relinked.
+
+        * assembler/MacroAssembler.h:
+        * assembler/MacroAssemblerARM.h:
+        (JSC::MacroAssemblerARM::patchableJump):
+        * jit/GPRInfo.h: Remove static_cast that are generating warnings in debug builds.
+        (JSC::GPRInfo::toIndex):
+        (JSC::GPRInfo::debugName):
+
 2013-11-07  Mark Lam  <[email protected]>
 
         Get rid of the regT* definitions in JSInterfaceJIT.h.

Modified: trunk/Source/_javascript_Core/assembler/MacroAssembler.h (158914 => 158915)


--- trunk/Source/_javascript_Core/assembler/MacroAssembler.h	2013-11-08 10:55:38 UTC (rev 158914)
+++ trunk/Source/_javascript_Core/assembler/MacroAssembler.h	2013-11-08 11:22:04 UTC (rev 158915)
@@ -359,6 +359,7 @@
         return PatchableJump(branchPtrWithPatch(cond, left, dataLabel, initialRightValue));
     }
 
+#if !CPU(ARM_TRADITIONAL)
     PatchableJump patchableJump()
     {
         return PatchableJump(jump());
@@ -374,6 +375,7 @@
         return PatchableJump(branch32(cond, reg, imm));
     }
 #endif
+#endif
 
     void jump(Label target)
     {

Modified: trunk/Source/_javascript_Core/assembler/MacroAssemblerARM.h (158914 => 158915)


--- trunk/Source/_javascript_Core/assembler/MacroAssemblerARM.h	2013-11-08 10:55:38 UTC (rev 158914)
+++ trunk/Source/_javascript_Core/assembler/MacroAssemblerARM.h	2013-11-08 11:22:04 UTC (rev 158915)
@@ -821,6 +821,11 @@
         return Jump(m_assembler.jmp(ARMCondition(cond)));
     }
 
+    PatchableJump patchableJump()
+    {
+        return PatchableJump(m_assembler.jmp(ARMAssembler::AL, 1));
+    }
+
     PatchableJump patchableBranch32(RelationalCondition cond, RegisterID reg, TrustedImm32 imm)
     {
         internalCompare32(reg, imm);

Modified: trunk/Source/_javascript_Core/jit/GPRInfo.h (158914 => 158915)


--- trunk/Source/_javascript_Core/jit/GPRInfo.h	2013-11-08 10:55:38 UTC (rev 158914)
+++ trunk/Source/_javascript_Core/jit/GPRInfo.h	2013-11-08 11:22:04 UTC (rev 158915)
@@ -496,8 +496,8 @@
 
     static unsigned toIndex(GPRReg reg)
     {
-        ASSERT(static_cast<unsigned>(reg) != InvalidGPRReg);
-        ASSERT(static_cast<unsigned>(reg) < 16);
+        ASSERT(reg != InvalidGPRReg);
+        ASSERT(reg < 16);
         static const unsigned indexForRegister[16] = { 0, 1, 2, 8, 3, 9, InvalidIndex, InvalidIndex, 4, 5, 6, 7, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex };
         unsigned result = indexForRegister[reg];
         ASSERT(result != InvalidIndex);
@@ -506,8 +506,8 @@
 
     static const char* debugName(GPRReg reg)
     {
-        ASSERT(static_cast<unsigned>(reg) != InvalidGPRReg);
-        ASSERT(static_cast<unsigned>(reg) < 16);
+        ASSERT(reg != InvalidGPRReg);
+        ASSERT(reg < 16);
         static const char* nameForRegister[16] = {
             "r0", "r1", "r2", "r3",
             "r4", "r5", "r6", "r7",
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to