Title: [158926] trunk/Source/_javascript_Core
Revision
158926
Author
[email protected]
Date
2013-11-08 10:25:52 -0800 (Fri, 08 Nov 2013)

Log Message

REGRESSION(r158883): Fix crashes for ARM architecture.
https://bugs.webkit.org/show_bug.cgi?id=124038

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

* jit/GPRInfo.h: Remove r11 from the temporary register set, use a free register for
nonPreservedNonReturnGPR and remove obsolete declaration of bucketCounterRegister.
(JSC::GPRInfo::toRegister):
(JSC::GPRInfo::toIndex):
* jit/JITOperations.cpp: Frame pointer register is r11 for ARM_TRADITIONAL and
r7 for ARM_THUMB2 instead of r5 since r158883.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (158925 => 158926)


--- trunk/Source/_javascript_Core/ChangeLog	2013-11-08 18:24:32 UTC (rev 158925)
+++ trunk/Source/_javascript_Core/ChangeLog	2013-11-08 18:25:52 UTC (rev 158926)
@@ -1,5 +1,19 @@
 2013-11-08  Julien Brianceau  <[email protected]>
 
+        REGRESSION(r158883): Fix crashes for ARM architecture.
+        https://bugs.webkit.org/show_bug.cgi?id=124038
+
+        Reviewed by Michael Saboff.
+
+        * jit/GPRInfo.h: Remove r11 from the temporary register set, use a free register for
+        nonPreservedNonReturnGPR and remove obsolete declaration of bucketCounterRegister.
+        (JSC::GPRInfo::toRegister):
+        (JSC::GPRInfo::toIndex):
+        * jit/JITOperations.cpp: Frame pointer register is r11 for ARM_TRADITIONAL and
+        r7 for ARM_THUMB2 instead of r5 since r158883.
+
+2013-11-08  Julien Brianceau  <[email protected]>
+
         REGRESSION(r158883): Fix crashes for MIPS architecture.
         https://bugs.webkit.org/show_bug.cgi?id=124044
 

Modified: trunk/Source/_javascript_Core/jit/GPRInfo.h (158925 => 158926)


--- trunk/Source/_javascript_Core/jit/GPRInfo.h	2013-11-08 18:24:32 UTC (rev 158925)
+++ trunk/Source/_javascript_Core/jit/GPRInfo.h	2013-11-08 18:25:52 UTC (rev 158926)
@@ -451,7 +451,7 @@
 class GPRInfo {
 public:
     typedef GPRReg RegisterType;
-    static const unsigned numberOfRegisters = 10;
+    static const unsigned numberOfRegisters = 9;
     static const unsigned numberOfArgumentRegisters = NUMBER_OF_ARGUMENT_REGISTERS;
 
     // Note: regT3 is required to be callee-preserved.
@@ -464,9 +464,8 @@
     static const GPRReg regT4 = ARMRegisters::r8;
     static const GPRReg regT5 = ARMRegisters::r9;
     static const GPRReg regT6 = ARMRegisters::r10;
-    static const GPRReg regT7 = ARMRegisters::r11;
+    static const GPRReg regT7 = ARMRegisters::r5;
     static const GPRReg regT8 = ARMRegisters::r3;
-    static const GPRReg regT9 = ARMRegisters::r5;
     // These registers match the baseline JIT.
     static const GPRReg cachedResultRegister = regT0;
     static const GPRReg cachedResultRegister2 = regT1;
@@ -481,16 +480,12 @@
     static const GPRReg nonArgGPR2 = ARMRegisters::r9; // regT5
     static const GPRReg returnValueGPR = ARMRegisters::r0; // regT0
     static const GPRReg returnValueGPR2 = ARMRegisters::r1; // regT1
-    static const GPRReg nonPreservedNonReturnGPR = ARMRegisters::r2;
+    static const GPRReg nonPreservedNonReturnGPR = ARMRegisters::r5; // regT7
 
-#if ENABLE(VALUE_PROFILER)
-    static const GPRReg bucketCounterRegister = ARMRegisters::r7;
-#endif
-
     static GPRReg toRegister(unsigned index)
     {
         ASSERT(index < numberOfRegisters);
-        static const GPRReg registerForIndex[numberOfRegisters] = { regT0, regT1, regT2, regT3, regT4, regT5, regT6, regT7, regT8, regT9 };
+        static const GPRReg registerForIndex[numberOfRegisters] = { regT0, regT1, regT2, regT3, regT4, regT5, regT6, regT7, regT8 };
         return registerForIndex[index];
     }
 
@@ -498,7 +493,7 @@
     {
         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 };
+        static const unsigned indexForRegister[16] = { 0, 1, 2, 8, 3, 7, InvalidIndex, InvalidIndex, 4, 5, 6, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex };
         unsigned result = indexForRegister[reg];
         ASSERT(result != InvalidIndex);
         return result;

Modified: trunk/Source/_javascript_Core/jit/JITOperations.cpp (158925 => 158926)


--- trunk/Source/_javascript_Core/jit/JITOperations.cpp	2013-11-08 18:24:32 UTC (rev 158925)
+++ trunk/Source/_javascript_Core/jit/JITOperations.cpp	2013-11-08 18:25:52 UTC (rev 158926)
@@ -1742,8 +1742,8 @@
 ".thumb" "\n"
 ".thumb_func " THUMB_FUNC_PARAM(getHostCallReturnValue) "\n"
 SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
-    "ldr r5, [r5, #0]" "\n" // CallerFrameAndPC::callerFrame
-    "mov r0, r5" "\n"
+    "ldr r7, [r7, #0]" "\n" // CallerFrameAndPC::callerFrame
+    "mov r0, r7" "\n"
     "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"
 );
 
@@ -1754,8 +1754,8 @@
 HIDE_SYMBOL(getHostCallReturnValue) "\n"
 INLINE_ARM_FUNCTION(getHostCallReturnValue)
 SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
-    "ldr r5, [r5, #0]" "\n" // CallerFrameAndPC::callerFrame
-    "mov r0, r5" "\n"
+    "ldr r11, [r11, #0]" "\n" // CallerFrameAndPC::callerFrame
+    "mov r0, r11" "\n"
     "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"
 );
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to