From f5acce7e11fa7c6abf5cf5352ec750c1ac65dd29 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 16 May 2011 13:47:09 +0200 Subject: Fix crashes with regular expressions QtScript on ARM traditional architectures Save and restore the r8 register properly. Backport of http://trac.webkit.org/changeset/65242 from WebKit trunk Reviewed-by: Jedrzej Nowacki --- src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexJIT.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexJIT.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexJIT.cpp index fcb8d86..1015923 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexJIT.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexJIT.cpp @@ -1312,6 +1312,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); #endif } @@ -1327,6 +1330,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); -- cgit v0.12