Author: David Schneider <[email protected]>
Branch: arm-backend-2
Changeset: r56766:35669087ed0b
Date: 2012-08-20 14:25 +0000
http://bitbucket.org/pypy/pypy/changeset/35669087ed0b/
Log: modify longlong storage for arm hard-float to manage floats as
floats
diff --git a/pypy/jit/codewriter/longlong.py b/pypy/jit/codewriter/longlong.py
--- a/pypy/jit/codewriter/longlong.py
+++ b/pypy/jit/codewriter/longlong.py
@@ -9,13 +9,14 @@
import sys
from pypy.rpython.lltypesystem import lltype, rffi
from pypy.rlib import rarithmetic, longlong2float
+from pypy.jit.backend.arm.detect import detect_hardfloat
+from pypy.rlib.objectmodel import compute_hash
if sys.maxint > 2147483647:
# ---------- 64-bit platform ----------
# the type FloatStorage is just a float
- from pypy.rlib.objectmodel import compute_hash
is_64_bit = True
supports_longlong = False
@@ -28,6 +29,22 @@
is_longlong = lambda TYPE: False
# -------------------------------------
+elif detect_hardfloat():
+ # ---------- ARM 32-bit platform ----------
+ # the type FloatStorage is float
+
+ is_64_bit = False
+ supports_longlong = False
+ r_float_storage = float
+ FLOATSTORAGE = lltype.Float
+
+ getfloatstorage = lambda x: x
+ getrealfloat = lambda x: x
+ gethash = compute_hash
+ is_longlong = lambda TYPE: False
+
+ # -------------------------------------
+
else:
# ---------- 32-bit platform ----------
# the type FloatStorage is r_longlong, and conversion is needed
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit