[pypy-commit] pypy jit-singlefloat: Fix tests.
arigo
noreply at buildbot.pypy.org
Thu Jul 28 23:48:03 CEST 2011
Author: Armin Rigo <arigo at tunes.org>
Branch: jit-singlefloat
Changeset: r46070:4936b4ec981c
Date: 2011-07-28 23:44 +0200
http://bitbucket.org/pypy/pypy/changeset/4936b4ec981c/
Log: Fix tests.
diff --git a/pypy/jit/backend/llgraph/llimpl.py b/pypy/jit/backend/llgraph/llimpl.py
--- a/pypy/jit/backend/llgraph/llimpl.py
+++ b/pypy/jit/backend/llgraph/llimpl.py
@@ -1071,6 +1071,8 @@
return heaptracker.adr2int(llmemory.cast_ptr_to_adr(x))
if TP == llmemory.Address:
return heaptracker.adr2int(x)
+ if TP is lltype.SingleFloat:
+ return longlong.singlefloat2int(x)
return lltype.cast_primitive(lltype.Signed, x)
def cast_from_int(TYPE, x):
@@ -1086,6 +1088,9 @@
x = llmemory.cast_int_to_adr(x)
assert lltype.typeOf(x) == llmemory.Address
return x
+ elif TYPE is lltype.SingleFloat:
+ assert lltype.typeOf(x) is lltype.Signed
+ return longlong.int2singlefloat(x)
else:
if lltype.typeOf(x) == llmemory.Address:
x = heaptracker.adr2int(x)
More information about the pypy-commit
mailing list