[pypy-svn] r62932 - pypy/branch/pyjitpl5/pypy/jit/backend/x86

arigo at codespeak.net arigo at codespeak.net
Fri Mar 13 13:26:52 CET 2009


Author: arigo
Date: Fri Mar 13 13:26:49 2009
New Revision: 62932

Modified:
   pypy/branch/pyjitpl5/pypy/jit/backend/x86/assembler.py
   pypy/branch/pyjitpl5/pypy/jit/backend/x86/runner.py
Log:
Minor changes, fix repr_of_arg(), and don't raise NotImplementedError
in there when seeing new unsupported subclasses of AbstractValue.


Modified: pypy/branch/pyjitpl5/pypy/jit/backend/x86/assembler.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/x86/assembler.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/x86/assembler.py	Fri Mar 13 13:26:49 2009
@@ -2,7 +2,7 @@
 import ctypes
 from pypy.jit.backend.x86 import symbolic
 from pypy.jit.metainterp.history import Const, ConstInt, Box, ConstPtr, BoxPtr,\
-     BoxInt
+     BoxInt, ConstAddr
 from pypy.rpython.lltypesystem import lltype, rffi, ll2ctypes, rstr, llmemory
 from pypy.rpython.lltypesystem.rclass import OBJECT
 from pypy.rpython.lltypesystem.lloperation import llop
@@ -34,8 +34,11 @@
         return "bi(%d,%d)" % (mv, arg.value)
     elif isinstance(arg, BoxPtr):
         return "bp(%d,%d)" % (mv, arg.get_())
+    elif isinstance(arg, ConstAddr):
+        return "ca(%d,%d)" % (mv, arg.get_())
     else:
-        raise NotImplementedError
+        #raise NotImplementedError
+        return "?%r" % (arg,)
 
 class Assembler386(object):
     MC_SIZE = 1024*1024     # 1MB, but assumed infinite for now
@@ -229,9 +232,6 @@
         genop_guard_list[op.op.opnum](self, op.op, op.guard_op, op.arglocs,
                                       op.result_loc)
 
-    def regalloc_store_to_arg(self, op):
-        self.mc.MOV(arg_pos(op.pos), op.from_loc)
-
     def _unaryop(asmop):
         def genop_unary(self, op, arglocs, resloc):
             getattr(self.mc, asmop)(arglocs[0])

Modified: pypy/branch/pyjitpl5/pypy/jit/backend/x86/runner.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/x86/runner.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/x86/runner.py	Fri Mar 13 13:26:49 2009
@@ -49,8 +49,8 @@
     def __ne__(self, other):
         return not self == other
 
-    def _getrepr_(self):
-        return repr(self.v)
+    def __repr__(self):
+        return '<ConstDescr3 %r>' % (self.v,)
 
 class CPU386(object):
     debug = True



More information about the Pypy-commit mailing list