Author: Richard Plangger <planri...@gmail.com>
Branch: memop-simplify3
Changeset: r81451:d826b4e1e7da
Date: 2015-12-28 12:58 +0100
http://bitbucket.org/pypy/pypy/changeset/d826b4e1e7da/

Log:    zero array passes again, needed to pass both the start scale and the
        length scale to the backend, let's see if there are more
        simplifications

diff --git a/rpython/jit/backend/test/runner_test.py 
b/rpython/jit/backend/test/runner_test.py
--- a/rpython/jit/backend/test/runner_test.py
+++ b/rpython/jit/backend/test/runner_test.py
@@ -4991,16 +4991,16 @@
             py.test.skip("llgraph does not do zero_array")
 
         PAIR = lltype.Struct('PAIR', ('a', lltype.Signed), ('b', 
lltype.Signed))
-        for OF in [rffi.SHORT]: #[lltype.Signed, rffi.INT, rffi.SHORT, 
rffi.UCHAR, PAIR]:
+        for OF in [lltype.Signed, rffi.INT, rffi.SHORT, rffi.UCHAR, PAIR]:
             A = lltype.GcArray(OF)
             arraydescr = self.cpu.arraydescrof(A)
             a = lltype.malloc(A, 100)
             addr = llmemory.cast_ptr_to_adr(a)
             a_int = heaptracker.adr2int(addr)
             a_ref = lltype.cast_opaque_ptr(llmemory.GCREF, a)
-            for (start, length) in [(0,100), (49, 49)]:#, (1, 98),
-                                    #(15, 9), (10, 10), (47, 0),
-                                    #(0, 4)]:
+            for (start, length) in [(0,100), (49, 49), (1, 98),
+                                    (15, 9), (10, 10), (47, 0),
+                                    (0, 4)]:
                 for cls1 in [ConstInt, InputArgInt]:
                     for cls2 in [ConstInt, InputArgInt]:
                         print 'a_int:', a_int
@@ -5033,7 +5033,7 @@
                                         lengthbox, scale, offset)
                         if v_len is None:
                             v_len = ConstInt(e_offset)
-                        import pdb; pdb.set_trace()
+                        #import pdb; pdb.set_trace()
                         args = [InputArgRef(a_ref), v_start, v_len,
                                 ConstInt(scale_start), ConstInt(scale_len)]
                         ops.append(ResOperation(rop.ZERO_ARRAY, args,
diff --git a/rpython/jit/backend/x86/regalloc.py 
b/rpython/jit/backend/x86/regalloc.py
--- a/rpython/jit/backend/x86/regalloc.py
+++ b/rpython/jit/backend/x86/regalloc.py
@@ -1415,7 +1415,7 @@
                 null_loc = self.xrm.force_allocate_reg(null_box)
                 self.xrm.possibly_free_var(null_box)
             self.perform_discard(op, [base_loc, startindex_loc,
-                                      imm(constbytes), imm(len_itemsize),
+                                      imm(constbytes), imm(start_itemsize),
                                       imm(baseofs), null_loc])
         else:
             # base_loc and startindex_loc are in two regs here (or they are
@@ -1423,6 +1423,7 @@
             # address that we will pass as first argument to memset().
             # It can be in the same register as either one, but not in
             # args[2], because we're still needing the latter.
+            #import pdb; pdb.set_trace()
             dstaddr_box = TempVar()
             dstaddr_loc = self.rm.force_allocate_reg(dstaddr_box, [args[2]])
             itemsize_loc = imm(start_itemsize)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to