Author: Armin Rigo <[email protected]>
Branch:
Changeset: r69098:3a0ef8f31265
Date: 2014-02-08 11:11 +0100
http://bitbucket.org/pypy/pypy/changeset/3a0ef8f31265/
Log: Fix the test on 64-bit
diff --git a/rpython/jit/codewriter/longlong.py
b/rpython/jit/codewriter/longlong.py
--- a/rpython/jit/codewriter/longlong.py
+++ b/rpython/jit/codewriter/longlong.py
@@ -26,6 +26,7 @@
getrealfloat = lambda x: x
gethash = compute_hash
gethash_fast = longlong2float.float2longlong
+ extract_bits = longlong2float.float2longlong
is_longlong = lambda TYPE: False
# -------------------------------------
@@ -42,6 +43,7 @@
getrealfloat = longlong2float.longlong2float
gethash = lambda xll: rarithmetic.intmask(xll - (xll >> 32))
gethash_fast = gethash
+ extract_bits = lambda x: x
is_longlong = lambda TYPE: (TYPE is lltype.SignedLongLong or
TYPE is lltype.UnsignedLongLong)
diff --git a/rpython/jit/metainterp/history.py
b/rpython/jit/metainterp/history.py
--- a/rpython/jit/metainterp/history.py
+++ b/rpython/jit/metainterp/history.py
@@ -275,7 +275,8 @@
def same_constant(self, other):
if isinstance(other, ConstFloat):
- return self.value == other.value
+ return (longlong.extract_bits(self.value) ==
+ longlong.extract_bits(other.value))
return False
def nonnull(self):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit