Author: David Schneider <[email protected]>
Branch: arm-backend-2
Changeset: r51573:ce782a82bacb
Date: 2012-01-21 12:13 +0100
http://bitbucket.org/pypy/pypy/changeset/ce782a82bacb/

Log:    off by one error when extracting call arguments in guard_call_xxx
        operations

diff --git a/pypy/jit/backend/arm/opassembler.py 
b/pypy/jit/backend/arm/opassembler.py
--- a/pypy/jit/backend/arm/opassembler.py
+++ b/pypy/jit/backend/arm/opassembler.py
@@ -1118,7 +1118,7 @@
         fail_index = self.cpu.get_fail_descr_number(faildescr)
         self._write_fail_index(fail_index)
         numargs = op.numargs()
-        callargs = arglocs[2:numargs]
+        callargs = arglocs[2:numargs + 1]  # extract the arguments to the call
         adr = arglocs[1]
         resloc = arglocs[0]
         self._emit_call(fail_index, adr, callargs, fcond, resloc)
@@ -1134,9 +1134,9 @@
         # first, close the stack in the sense of the asmgcc GC root tracker
         gcrootmap = self.cpu.gc_ll_descr.gcrootmap
         numargs = op.numargs()
+        callargs = arglocs[2:numargs + 1]  # extract the arguments to the call
+        adr = arglocs[1]
         resloc = arglocs[0]
-        adr = arglocs[1]
-        callargs = arglocs[2:numargs]
 
         if gcrootmap:
             self.call_release_gil(gcrootmap, arglocs, fcond)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to