[pypy-commit] pypy default: merge heads
arigo
noreply at buildbot.pypy.org
Mon Aug 6 15:43:08 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r56606:f9c21a2510f3
Date: 2012-08-06 15:42 +0200
http://bitbucket.org/pypy/pypy/changeset/f9c21a2510f3/
Log: merge heads
diff --git a/pypy/jit/backend/test/runner_test.py b/pypy/jit/backend/test/runner_test.py
--- a/pypy/jit/backend/test/runner_test.py
+++ b/pypy/jit/backend/test/runner_test.py
@@ -3206,6 +3206,20 @@
res = self.cpu.get_latest_value_int(0)
assert res == -10
+ def test_int_force_ge_zero(self):
+ ops = """
+ [i0]
+ i1 = int_force_ge_zero(i0) # but forced to be in a register
+ finish(i1, descr=1)
+ """
+ loop = parse(ops, self.cpu, namespace=locals())
+ descr = loop.operations[-1].getdescr()
+ looptoken = JitCellToken()
+ self.cpu.compile_loop(loop.inputargs, loop.operations, looptoken)
+ for inp, outp in [(2,2), (-3, 0)]:
+ self.cpu.execute_token(looptoken, inp)
+ assert outp == self.cpu.get_latest_value_int(0)
+
def test_compile_asmlen(self):
from pypy.jit.backend.llsupport.llmodel import AbstractLLCPU
if not isinstance(self.cpu, AbstractLLCPU):
More information about the pypy-commit
mailing list