Author: Richard Plangger <[email protected]>
Branch: s390x-backend
Changeset: r82166:f535e775dd54
Date: 2016-02-11 16:54 +0100
http://bitbucket.org/pypy/pypy/changeset/f535e775dd54/
Log: using gc_load_r for reading a constptr since index scale and offset
are constant and added to the index in rewrite, ndarray test that
would fail on little endian (did not distinct this case)
diff --git a/pypy/module/micronumpy/test/test_ndarray.py
b/pypy/module/micronumpy/test/test_ndarray.py
--- a/pypy/module/micronumpy/test/test_ndarray.py
+++ b/pypy/module/micronumpy/test/test_ndarray.py
@@ -1840,8 +1840,12 @@
assert y[0] == 513 == 0x0201
assert y.dtype == dtype('int16')
y[0] = 670
- assert x[0] == 2
- assert x[1] == -98
+ if sys.byteorder == 'little':
+ assert x[0] == -98
+ assert x[1] == 2
+ else:
+ assert x[0] == 2
+ assert x[1] == -98
f = array([1000, -1234], dtype='i4')
nnp = self.non_native_prefix
d = f.view(dtype=nnp + 'i4')
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
@@ -168,10 +168,8 @@
array_index = array_index * factor + offset
args = [moving_obj_tracker.const_ptr_gcref_array,
ConstInt(array_index),
- ConstInt(1), # already multiplied to array_index
- ConstInt(0), # already added
ConstInt(size)]
- load_op = ResOperation(rop.GC_LOAD_INDEXED_R, args)
+ load_op = ResOperation(rop.GC_LOAD_R, args)
newops.append(load_op)
op.setarg(arg_i, load_op)
#
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit