Fix try/catch on ARM
authorSimon Hausmann <simon.hausmann@digia.com>
Tue, 25 Jun 2013 14:18:30 +0000 (16:18 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 26 Jun 2013 17:52:13 +0000 (19:52 +0200)
When returning _to_ tryWrapper we pass the address on where to continue
execution in r0. So in our leaveStackFrame() we shouldn't clobber r0
and in fact there's little value in restoring r0-r3 given that they're
used to pass arguments and don't require save/restore.

Change-Id: Iba0091e19eb74347472e698ffc7687e647a5e5be
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/qml/v4/qv4isel_masm_p.h

index 30dbc62..b0ba22d 100644 (file)
@@ -183,10 +183,7 @@ public:
     inline void platformLeaveStandardStackFrame()
     {
         pop(JSC::ARMRegisters::lr);
-        pop(JSC::ARMRegisters::r0);
-        pop(JSC::ARMRegisters::r1);
-        pop(JSC::ARMRegisters::r2);
-        pop(JSC::ARMRegisters::r3);
+        addPtr(TrustedImm32(4 * RegisterSize), StackPointerRegister);
     }
 #else
 #error The JIT needs to be ported to this platform.