[pypy-commit] pypy default: remove unsupported operation in the stress tests (call_cond_value)

plan_rich pypy.commits at gmail.com
Wed Sep 21 11:23:04 EDT 2016


Author: Richard Plangger <planrichi at gmail.com>
Branch: 
Changeset: r87279:fb75857b6dd4
Date: 2016-09-21 17:09 +0200
http://bitbucket.org/pypy/pypy/changeset/fb75857b6dd4/

Log:	remove unsupported operation in the stress tests (call_cond_value)

diff --git a/rpython/jit/backend/test/zll_stress.py b/rpython/jit/backend/test/zll_stress.py
--- a/rpython/jit/backend/test/zll_stress.py
+++ b/rpython/jit/backend/test/zll_stress.py
@@ -1,6 +1,7 @@
 from rpython.jit.backend.test.test_random import check_random_function, Random
 from rpython.jit.backend.test.test_ll_random import LLtypeOperationBuilder
 from rpython.jit.backend.detect_cpu import getcpuclass
+from rpython.jit.metainterp.resoperation import rop
 import platform
 
 CPU = getcpuclass()
@@ -18,6 +19,14 @@
     cpu.setup_once()
     r = Random()
     r.jumpahead(piece*99999999)
+    OPERATIONS = LLtypeOperationBuilder.OPERATIONS[:]
+    if not cpu.supports_cond_call_value:
+        # remove COND_CALL_VALUE_I if the cpu does not support it
+        ops = LLtypeOperationBuilder.OPERATIONS
+        LLtypeOperationBuilder.OPERATIONS = [op for op in ops \
+                if op.opnum != rop.COND_CALL_VALUE_I]
     for i in range(piece*per_piece, (piece+1)*per_piece):
         print "        i = %d; r.setstate(%s)" % (i, r.getstate())
         check_random_function(cpu, LLtypeOperationBuilder, r, i, total_iterations)
+    # restore the old list
+    LLtypeOperationBuilder.OPERATIONS = OPERATIONS


More information about the pypy-commit mailing list