[pypy-svn] pypy jit-longlong: Add test_longlong to the x86 backend, and fix llsupport.descr.

arigo commits-noreply at bitbucket.org
Sat Jan 8 17:21:03 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: jit-longlong
Changeset: r40496:f8bc53393234
Date: 2011-01-08 16:41 +0100
http://bitbucket.org/pypy/pypy/changeset/f8bc53393234/

Log:	Add test_longlong to the x86 backend, and fix llsupport.descr. It
	probably shows a bug right now.

diff --git a/pypy/jit/backend/x86/test/test_longlong.py b/pypy/jit/backend/x86/test/test_longlong.py
new file mode 100644
--- /dev/null
+++ b/pypy/jit/backend/x86/test/test_longlong.py
@@ -0,0 +1,7 @@
+from pypy.jit.metainterp.test import test_longlong
+from pypy.jit.backend.x86.test.test_basic import Jit386Mixin
+
+class TestLongLong(Jit386Mixin, test_longlong.LongLongTests):
+    # for the individual tests see
+    # ====> ../../../metainterp/test/test_longlong.py
+    pass

diff --git a/pypy/jit/backend/llsupport/descr.py b/pypy/jit/backend/llsupport/descr.py
--- a/pypy/jit/backend/llsupport/descr.py
+++ b/pypy/jit/backend/llsupport/descr.py
@@ -334,7 +334,7 @@
     if isinstance(x, r_longlong):
         return longlong2float(x)
     if isinstance(x, r_ulonglong):
-        return longlong2float(r_longlong(x))
+        return longlong2float(rffi.cast(lltype.SignedLongLong, x))
     assert isinstance(x, float)
     return x
 cast_to_float._annspecialcase_ = 'specialize:argtype(0)'


More information about the Pypy-commit mailing list