[pypy-svn] r64611 - pypy/branch/pyjitpl5/pypy/jit/backend/x86/test
arigo at codespeak.net
arigo at codespeak.net
Thu Apr 23 22:17:42 CEST 2009
Author: arigo
Date: Thu Apr 23 22:17:39 2009
New Revision: 64611
Modified:
pypy/branch/pyjitpl5/pypy/jit/backend/x86/test/test_regalloc2.py
Log:
The next failing test.
Modified: pypy/branch/pyjitpl5/pypy/jit/backend/x86/test/test_regalloc2.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/x86/test/test_regalloc2.py (original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/x86/test/test_regalloc2.py Thu Apr 23 22:17:39 2009
@@ -1,3 +1,4 @@
+import py
from pypy.jit.metainterp.history import ResOperation, BoxInt, ConstInt,\
BoxPtr, ConstPtr, TreeLoop
from pypy.jit.metainterp.resoperation import rop
@@ -21,3 +22,25 @@
cpu.execute_operations(loop, [BoxInt(9)])
assert v4.value == (9 >> 3)
assert v3.value == (~18)
+
+def test_bug_int_is_true_1():
+ py.test.skip('fix me')
+ v1 = BoxInt()
+ v2 = BoxInt()
+ v3 = BoxInt()
+ v4 = BoxInt()
+ tmp5 = BoxInt()
+ loop = TreeLoop('test')
+ loop.inputargs = [v1]
+ loop.operations = [
+ ResOperation(rop.INT_MUL, [v1, v1], v2),
+ ResOperation(rop.INT_MUL, [v2, v1], v3),
+ ResOperation(rop.INT_IS_TRUE, [v2], tmp5),
+ ResOperation(rop.BOOL_NOT, [tmp5], v4),
+ ResOperation(rop.FAIL, [v4, v3], None),
+ ]
+ cpu = CPU(None, None)
+ cpu.compile_operations(loop)
+ cpu.execute_operations(loop, [BoxInt(-10)])
+ assert v4.value == 0
+ assert v3.value == -1000
More information about the Pypy-commit
mailing list