Author: Richard Plangger <[email protected]>
Branch: ppc-vsx-support
Changeset: r86883:199d8fd839ac
Date: 2016-09-05 16:41 +0200
http://bitbucket.org/pypy/pypy/changeset/199d8fd839ac/
Log: return register immediately if it is the right one (base case)
diff --git a/rpython/jit/backend/x86/vector_ext.py
b/rpython/jit/backend/x86/vector_ext.py
--- a/rpython/jit/backend/x86/vector_ext.py
+++ b/rpython/jit/backend/x86/vector_ext.py
@@ -308,7 +308,7 @@
self.mc.CMPPD_xxi(lhsloc.value, rhsloc.value, 0)
self.flush_vec_cc(rx86.Conditions["E"], lhsloc, resloc, sizeloc.value)
- def flush_vec_cc(self, rev_cond, lhsloc, resloc, size):
+ def flush_vec_cc(self, rev_cond, lhsloc, resloc, size)
# After emitting an instruction that leaves a boolean result in
# a condition code (cc), call this. In the common case, result_loc
# will be set to SPP by the regalloc, which in this case means
@@ -322,6 +322,7 @@
assert lhsloc is xmm0
maskloc = X86_64_XMM_SCRATCH_REG
self.mc.MOVAPD(maskloc, heap(self.element_ones[get_scale(size)]))
+ self.mc.PXOR(resloc, resloc)
# note that resloc contains true false for each element by the
last compare operation
self.mc.PBLENDVB_xx(resloc.value, maskloc.value)
@@ -643,7 +644,12 @@
instructions.
"""
xrm = self.xrm
+ curloc = self.loc(arg)
+ if curloc is selected_reg:
+ # nothing to do, it is already in the correct register
+ return selected_reg
if selected_reg not in xrm.free_regs:
+ # we need to move some registers
variable = None
candidate_to_spill = None
for var, reg in self.xrm.reg_bindings.items():
diff --git a/rpython/jit/metainterp/test/test_vector.py
b/rpython/jit/metainterp/test/test_vector.py
--- a/rpython/jit/metainterp/test/test_vector.py
+++ b/rpython/jit/metainterp/test/test_vector.py
@@ -156,9 +156,9 @@
i += size
la = data.draw(st.lists(st.floats(), min_size=10, max_size=150))
- #la = [0.0,0.0,0.0,0.0,0.0,0.0,0.0]
- #lb = [0.0,0.0,0.0,0.0,1.7976931348623157e+308,0.0,0.0]
+ #la = [0.0, 0.0, 0.0, 0.0, 5e-324, 0.0, 0.0, 5e-324, 0.0, 0.0]
l = len(la)
+ #lb = [0.0] * l
lb = data.draw(st.lists(st.floats(), min_size=l, max_size=l))
rawstorage = RawStorage()
@@ -215,6 +215,9 @@
la = data.draw(st.lists(integers, min_size=10, max_size=150))
l = len(la)
lb = data.draw(st.lists(integers, min_size=l, max_size=l))
+ #la = [0] * 10
+ #l = 10
+ #lb = [0] * 10
rawstorage = RawStorage()
va = rawstorage.new(la, type)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit