Author: David Schneider <[email protected]>
Branch: release-2.0-beta2
Changeset: r59068:1c4a7427e991
Date: 2012-11-22 19:39 +0100
http://bitbucket.org/pypy/pypy/changeset/1c4a7427e991/

Log:    fix for cond_call_gc_wb.

        The code was based on the wrong assumption that the operation only
        has 2 arguments

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
@@ -656,7 +656,7 @@
             # must save the register loc_index before it is mutated
             self.mc.PUSH([loc_index.value])
             tmp1 = loc_index
-            tmp2 = arglocs[2]
+            tmp2 = arglocs[-1]  # the last item is a preallocated tmp
             # lr = byteofs
             s = 3 + descr.jit_wb_card_page_shift
             self.mc.MVN_rr(r.lr.value, loc_index.value,
diff --git a/pypy/jit/backend/arm/regalloc.py b/pypy/jit/backend/arm/regalloc.py
--- a/pypy/jit/backend/arm/regalloc.py
+++ b/pypy/jit/backend/arm/regalloc.py
@@ -1095,7 +1095,8 @@
         args = op.getarglist()
         arglocs = [self._ensure_value_is_boxed(op.getarg(i), args)
                                                               for i in 
range(N)]
-        tmp = self.get_scratch_reg(INT)
+        tmp = self.get_scratch_reg(INT, args)
+        assert tmp not in arglocs
         arglocs.append(tmp)
         return arglocs
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to