[pypy-commit] pypy s390x-backend: issue while rewriting, missed constant factor that is not multiplied to index

plan_rich pypy.commits at gmail.com
Tue Jan 19 03:56:32 EST 2016


Author: Richard Plangger <planrichi at gmail.com>
Branch: s390x-backend
Changeset: r81846:69b3adf80fac
Date: 2016-01-19 09:55 +0100
http://bitbucket.org/pypy/pypy/changeset/69b3adf80fac/

Log:	issue while rewriting, missed constant factor that is not multiplied
	to index

diff --git a/rpython/jit/backend/llsupport/gc.py b/rpython/jit/backend/llsupport/gc.py
--- a/rpython/jit/backend/llsupport/gc.py
+++ b/rpython/jit/backend/llsupport/gc.py
@@ -163,11 +163,11 @@
             assert isinstance(v, ConstPtr)
             array_index = moving_obj_tracker.get_array_index(v)
 
-            size, offset, _ = unpack_arraydescr(moving_obj_tracker.ptr_array_descr)
-            scale = size
+            factor, offset, _ = unpack_arraydescr(moving_obj_tracker.ptr_array_descr)
+            array_index = array_index * factor
             args = [moving_obj_tracker.const_ptr_gcref_array,
                     ConstInt(array_index),
-                    ConstInt(scale),
+                    ConstInt(1), # already multiplied to array_index
                     ConstInt(offset),
                     ConstInt(size)]
             load_op = ResOperation(rop.GC_LOAD_INDEXED_R, args)


More information about the pypy-commit mailing list