Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r71085:9761ff01220d Date: 2014-04-30 14:38 +0200 http://bitbucket.org/pypy/pypy/changeset/9761ff01220d/
Log: Add a test for cast_float_to_singlefloat. Fails so far because the x86 backend doesn't correctly zero out the upper 4 bytes. diff --git a/rpython/jit/backend/test/runner_test.py b/rpython/jit/backend/test/runner_test.py --- a/rpython/jit/backend/test/runner_test.py +++ b/rpython/jit/backend/test/runner_test.py @@ -4347,3 +4347,10 @@ 'void') assert foo[0] == 1789201 lltype.free(foo, flavor='raw') + + def test_cast_float_to_singlefloat(self): + if not self.cpu.supports_singlefloats: + py.test.skip("requires singlefloats") + res = self.execute_operation(rop.CAST_FLOAT_TO_SINGLEFLOAT, + [BoxFloat(12.5)], 'int') + assert res.getint() == struct.unpack("I", struct.pack("f", 12.5))[0] _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit