Author: Antonio Cuni <anto.c...@gmail.com> Branch: faster-rstruct-2 Changeset: r91264:a735e006ad8a Date: 2017-05-12 01:18 +0200 http://bitbucket.org/pypy/pypy/changeset/a735e006ad8a/
Log: add a passing test for single floats diff --git a/rpython/jit/backend/llgraph/runner.py b/rpython/jit/backend/llgraph/runner.py --- a/rpython/jit/backend/llgraph/runner.py +++ b/rpython/jit/backend/llgraph/runner.py @@ -751,6 +751,8 @@ descr): T = self._get_int_type_from_size(bytes) val = lltype.cast_primitive(T, val) + if descr.A.OF == lltype.SingleFloat: + val = longlong.int2singlefloat(val) llop.gc_store_indexed(lltype.Void, struct, index, scale, base_ofs, val) def bh_gc_store_indexed_f(self, struct, index, scale, base_ofs, val, bytes, diff --git a/rpython/rtyper/test/test_llop.py b/rpython/rtyper/test/test_llop.py --- a/rpython/rtyper/test/test_llop.py +++ b/rpython/rtyper/test/test_llop.py @@ -54,6 +54,10 @@ expected = struct.pack('d', 123.456) self.newlist_and_gc_store(rffi.DOUBLE, 123.456, expected) + def test_gc_store_indexed_float(self): + expected = struct.pack('f', 123.456) + self.newlist_and_gc_store(rffi.FLOAT, 123.456, expected) + class TestDirect(BaseLLOpTest): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit