[pypy-commit] pypy jitframe-on-heap: merge

fijal noreply at buildbot.pypy.org
Mon Feb 11 15:01:12 CET 2013


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: jitframe-on-heap
Changeset: r61095:60480aa850b8
Date: 2013-02-11 16:00 +0200
http://bitbucket.org/pypy/pypy/changeset/60480aa850b8/

Log:	merge

diff --git a/rpython/jit/backend/x86/jump.py b/rpython/jit/backend/x86/jump.py
--- a/rpython/jit/backend/x86/jump.py
+++ b/rpython/jit/backend/x86/jump.py
@@ -1,6 +1,7 @@
 import sys
 from rpython.tool.pairtype import extendabletype
-from rpython.jit.backend.x86.regloc import ImmediateAssemblerLocation, StackLoc
+from rpython.jit.backend.x86.regloc import ImmediateAssemblerLocation
+from rpython.jit.backend.x86.regloc import RegLoc, StackLoc
 
 def remap_frame_layout(assembler, src_locations, dst_locations, tmpreg):
     pending_dests = len(dst_locations)
diff --git a/rpython/jit/backend/x86/regloc.py b/rpython/jit/backend/x86/regloc.py
--- a/rpython/jit/backend/x86/regloc.py
+++ b/rpython/jit/backend/x86/regloc.py
@@ -53,9 +53,6 @@
         self.value = value
         self.type = type
 
-    def _getregkey(self):
-        return -(self.value * 2 + 2)
-
     def get_width(self):
         if self.type == FLOAT:
             return 8
@@ -80,11 +77,12 @@
     _location_code = 's'
 
     def __init__(self, value, type):
+        assert value >= 0
         self.value = value
         self.type = type
 
     def _getregkey(self):
-        return -(self.value * 2 + 1)
+        return ~self.value
 
     def get_width(self):
         if self.type == FLOAT:
@@ -107,8 +105,7 @@
         # _getregkey() returns self.value; the value returned must not
         # conflict with RegLoc._getregkey().  It doesn't a bit by chance,
         # so let it fail the following assert if it no longer does.
-        assert ebp_offset >= 0
-        #assert not (0 <= ebp_offset < 8 + 8 * IS_X86_64)
+        assert ebp_offset >= 8 + 8 * IS_X86_64
         self.position = position
         #if position != 9999:
         #    assert (position + JITFRAME_FIXED_SIZE) * WORD == ebp_offset


More information about the pypy-commit mailing list