[pypy-commit] pypy faster-rstruct-2: rpython fix for 32 bit

antocuni pypy.commits at gmail.com
Fri May 19 05:52:26 EDT 2017


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: faster-rstruct-2
Changeset: r91339:acd0aa896e2d
Date: 2017-05-19 11:51 +0200
http://bitbucket.org/pypy/pypy/changeset/acd0aa896e2d/

Log:	rpython fix for 32 bit

diff --git a/rpython/rlib/rstruct/nativefmttable.py b/rpython/rlib/rstruct/nativefmttable.py
--- a/rpython/rlib/rstruct/nativefmttable.py
+++ b/rpython/rlib/rstruct/nativefmttable.py
@@ -6,7 +6,7 @@
 
 from rpython.rlib import jit, longlong2float
 from rpython.rlib.objectmodel import specialize
-from rpython.rlib.rarithmetic import r_singlefloat, widen
+from rpython.rlib.rarithmetic import r_singlefloat, widen, intmask
 from rpython.rlib.rstruct import standardfmttable as std
 from rpython.rlib.rstruct.standardfmttable import native_is_bigendian
 from rpython.rlib.rstruct.error import StructError
@@ -44,6 +44,7 @@
     # slow path
     value = longlong2float.singlefloat2uint(floatval)
     value = widen(value)
+    value = intmask(value)
     pack_float_to_buffer(fmtiter.wbuf, fmtiter.pos, value, 4, fmtiter.bigendian)
     fmtiter.advance(4)
 


More information about the pypy-commit mailing list