[pypy-svn] r76546 - pypy/trunk/pypy/jit/backend/x86

jcreigh at codespeak.net jcreigh at codespeak.net
Mon Aug 9 16:32:12 CEST 2010


Author: jcreigh
Date: Mon Aug  9 16:32:11 2010
New Revision: 76546

Modified:
   pypy/trunk/pypy/jit/backend/x86/assembler.py
   pypy/trunk/pypy/jit/backend/x86/regloc.py
Log:
hack to make 64-bit JIT translate (should really fix issue r76491 tried to fix)

Modified: pypy/trunk/pypy/jit/backend/x86/assembler.py
==============================================================================
--- pypy/trunk/pypy/jit/backend/x86/assembler.py	(original)
+++ pypy/trunk/pypy/jit/backend/x86/assembler.py	Mon Aug  9 16:32:11 2010
@@ -20,7 +20,7 @@
                                          r12, r13, r14, r15,
                                          X86_64_SCRATCH_REG,
                                          X86_64_XMM_SCRATCH_REG,
-                                         RegLoc, StackLoc,
+                                         RegLoc, StackLoc, ConstFloatLoc,
                                          ImmedLoc, AddressLoc, imm)
 
 from pypy.rlib.objectmodel import we_are_translated, specialize
@@ -818,8 +818,13 @@
 
         for i in range(start, len(arglocs)):
             loc = arglocs[i]
-            # XXX: Should be much simplier to tell whether a location is a float!
-            if (isinstance(loc, RegLoc) and loc.is_xmm) or (loc.is_memory_reference() and loc.type == FLOAT):
+            # XXX: Should be much simplier to tell whether a location is a
+            # float! It's so ugly because we have to "guard" the access to
+            # .type with isinstance, since not all AssemblerLocation classes
+            # are "typed"
+            if ((isinstance(loc, RegLoc) and loc.is_xmm) or
+                (isinstance(loc, StackLoc) and loc.type == FLOAT) or
+                (isinstance(loc, ConstFloatLoc))):
                 if len(unused_xmm) > 0:
                     xmm_src_locs.append(loc)
                     xmm_dst_locs.append(unused_xmm.pop())

Modified: pypy/trunk/pypy/jit/backend/x86/regloc.py
==============================================================================
--- pypy/trunk/pypy/jit/backend/x86/regloc.py	(original)
+++ pypy/trunk/pypy/jit/backend/x86/regloc.py	Mon Aug  9 16:32:11 2010
@@ -154,7 +154,6 @@
     _immutable_ = True
 
     width = 8
-    type = FLOAT
 
     def __init__(self, address, const_id):
         self.value = address



More information about the Pypy-commit mailing list