[pypy-commit] pypy ppc-vsx-support: assert that vector_ext cannot be none at that position (optmize_vector will never be entered if is none)

plan_rich pypy.commits at gmail.com
Wed Nov 2 10:35:59 EDT 2016


Author: Richard Plangger <planrichi at gmail.com>
Branch: ppc-vsx-support
Changeset: r88083:12b46db4a793
Date: 2016-11-02 15:35 +0100
http://bitbucket.org/pypy/pypy/changeset/12b46db4a793/

Log:	assert that vector_ext cannot be none at that position
	(optmize_vector will never be entered if is none)

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
@@ -77,7 +77,9 @@
         assert isinstance(arg, VectorOp)
         size = arg.bytesize
         temp = X86_64_XMM_SCRATCH_REG
-        load = arg.bytesize * arg.count - self.cpu.vector_ext.register_size
+        ve = self.cpu.vector_ext
+        assert ve is not None # MUST hold, optimize_vector is never entered if vector_ext is entered
+        load = arg.bytesize * arg.count - ve.register_size
         assert load <= 0
         if true:
             self.mc.PXOR(temp, temp)


More information about the pypy-commit mailing list