bug=421274 follow up to fix issues with 64 bit
authorigor@mir2.org
Thu, 13 Mar 2008 10:29:40 -0700
changeset 13011 8a8b1f94e0787dcde8d988cf3ef897bad84a1cf5
parent 13010 6a632cc4adc758b9ff839228926f39543e46b144
child 13012 90bf98eb63086a0556f78ec85b8ae7c93c263385
push idunknown
push userunknown
push dateunknown
bugs421274
milestone1.9b5pre
bug=421274 follow up to fix issues with 64 bit
js/src/jsinterp.c
--- a/js/src/jsinterp.c
+++ b/js/src/jsinterp.c
@@ -2872,19 +2872,21 @@ interrupt:
 
                 /* Restore context version only if callee hasn't set version. */
                 if (JS_LIKELY(cx->version == currentVersion)) {
                     currentVersion = ifp->callerVersion;
                     if (currentVersion != cx->version)
                         js_SetVersion(cx, currentVersion);
                 }
 
-                /* Store the return value in the caller's operand frame. */
+                /* Restore caller's registers. */
                 regs = ifp->callerRegs;
-                regs.sp += 1 - 2 - ifp->frame.argc;
+
+                /* Store the return value in the caller's operand frame. */
+                regs.sp -= (ptrdiff_t) (1 + ifp->frame.argc);
                 regs.sp[-1] = fp->rval;
 
                 /* Restore cx->fp and release the inline frame's space. */
                 cx->fp = fp = fp->down;
                 JS_ASSERT(fp->regs == &ifp->callerRegs);
                 fp->regs = &regs;
                 JS_ARENA_RELEASE(&cx->stackPool, ifp->mark);