[pypy-commit] pypy default: add the new op to llinterp, fixes tests.

alex_gaynor noreply at buildbot.pypy.org
Tue Mar 20 17:25:14 CET 2012


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: 
Changeset: r53838:3976bd326a08
Date: 2012-03-20 16:23 +0000
http://bitbucket.org/pypy/pypy/changeset/3976bd326a08/

Log:	add the new op to llinterp, fixes tests.

diff --git a/pypy/rpython/llinterp.py b/pypy/rpython/llinterp.py
--- a/pypy/rpython/llinterp.py
+++ b/pypy/rpython/llinterp.py
@@ -770,6 +770,10 @@
         checkadr(adr)
         return llmemory.cast_adr_to_int(adr, mode)
 
+    def op_convert_float_bytes_to_longlong(self, f):
+        from pypy.rlib import longlong2float
+        return longlong2float.float2longlong(f)
+
     def op_weakref_create(self, v_obj):
         def objgetter():    # special support for gcwrapper.py
             return self.getval(v_obj)
diff --git a/pypy/rpython/lltypesystem/lloperation.py b/pypy/rpython/lltypesystem/lloperation.py
--- a/pypy/rpython/lltypesystem/lloperation.py
+++ b/pypy/rpython/lltypesystem/lloperation.py
@@ -349,6 +349,7 @@
     'cast_float_to_ulonglong':LLOp(canfold=True),
     'truncate_longlong_to_int':LLOp(canfold=True),
     'force_cast':           LLOp(sideeffects=False),    # only for rffi.cast()
+    'convert_float_bytes_to_longlong': LLOp(canfold=True),
 
     # __________ pointer operations __________
 


More information about the pypy-commit mailing list