The scratch register should be saved in YARR with ARM JIT
authorloki@webkit.org <loki@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Aug 2010 13:37:55 +0000 (13:37 +0000)
committerloki@webkit.org <loki@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Aug 2010 13:37:55 +0000 (13:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=43910

Reviewed by Simon Hausmann.

Reported by Jocelyn Turcotte.

* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generateEnter):
(JSC::Yarr::RegexGenerator::generateReturn):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@65242 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/yarr/RegexJIT.cpp

index 80578f8..a2fafec 100644 (file)
@@ -1,3 +1,16 @@
+2010-08-12  Gabor Loki  <loki@webkit.org>
+
+        Reviewed by Simon Hausmann.
+
+        The scratch register should be saved in YARR with ARM JIT
+        https://bugs.webkit.org/show_bug.cgi?id=43910
+
+        Reported by Jocelyn Turcotte.
+
+        * yarr/RegexJIT.cpp:
+        (JSC::Yarr::RegexGenerator::generateEnter):
+        (JSC::Yarr::RegexGenerator::generateReturn):
+
 2010-08-11  Gavin Barraclough  <barraclough@apple.com>
 
         Windows build fix.
index e158f8f..4c21547 100644 (file)
@@ -1416,6 +1416,9 @@ class RegexGenerator : private MacroAssembler {
         push(ARMRegisters::r4);
         push(ARMRegisters::r5);
         push(ARMRegisters::r6);
+#if CPU(ARM_TRADITIONAL)
+        push(ARMRegisters::r8); // scratch register
+#endif
         move(ARMRegisters::r3, output);
 #elif CPU(MIPS)
         // Do nothing.
@@ -1433,6 +1436,9 @@ class RegexGenerator : private MacroAssembler {
         pop(X86Registers::ebx);
         pop(X86Registers::ebp);
 #elif CPU(ARM)
+#if CPU(ARM_TRADITIONAL)
+        pop(ARMRegisters::r8); // scratch register
+#endif
         pop(ARMRegisters::r6);
         pop(ARMRegisters::r5);
         pop(ARMRegisters::r4);