[pypy-svn] r62664 - in pypy/branch/pyjitpl5/pypy/jit: backend/x86 backend/x86/test metainterp

fijal at codespeak.net fijal at codespeak.net
Fri Mar 6 20:07:52 CET 2009


Author: fijal
Date: Fri Mar  6 20:07:51 2009
New Revision: 62664

Modified:
   pypy/branch/pyjitpl5/pypy/jit/backend/x86/regalloc.py
   pypy/branch/pyjitpl5/pypy/jit/backend/x86/runner.py
   pypy/branch/pyjitpl5/pypy/jit/backend/x86/test/test_runner.py
   pypy/branch/pyjitpl5/pypy/jit/metainterp/codewriter.py
Log:
aha! find out who is calling calldescr with function as well as arg


Modified: pypy/branch/pyjitpl5/pypy/jit/backend/x86/regalloc.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/x86/regalloc.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/x86/regalloc.py	Fri Mar  6 20:07:51 2009
@@ -724,7 +724,7 @@
         from pypy.jit.backend.x86.runner import CPU386
         calldescr = op.descr
         numargs, size, _ = CPU386.unpack_calldescr(calldescr)
-        assert numargs == len(op.args)
+        assert numargs == len(op.args) - 1
         return self._call(op, [imm(size)] +
                           [self.loc(arg) for arg in op.args])
 

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  6 20:07:51 2009
@@ -271,7 +271,7 @@
             return self.generated_mps[calldescr]
         except KeyError:
             pass
-        args = [BoxInt(0) for i in range(argnum)]
+        args = [BoxInt(0) for i in range(argnum + 1)]
         result = BoxInt(0)
         operations = [
             ResOperation(rop.MERGE_POINT, args, None),

Modified: pypy/branch/pyjitpl5/pypy/jit/backend/x86/test/test_runner.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/x86/test/test_runner.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/x86/test/test_runner.py	Fri Mar  6 20:07:51 2009
@@ -524,7 +524,7 @@
             return chr(ord(c) + 1)
         FPTR = lltype.Ptr(lltype.FuncType([lltype.Char], lltype.Char))
         func_ptr = llhelper(FPTR, func)
-        calldescr = cpu.calldescrof([FPTR, lltype.Char], lltype.Char)
+        calldescr = cpu.calldescrof([lltype.Char], lltype.Char)
         x = cpu.do_call(
             [BoxInt(cpu.cast_adr_to_int(llmemory.cast_ptr_to_adr(func_ptr))),
              BoxInt(ord('A'))],

Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/codewriter.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/codewriter.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/codewriter.py	Fri Mar  6 20:07:51 2009
@@ -671,7 +671,7 @@
         args = [x for x in op.args if x.concretetype is not lltype.Void]
         argtypes = [v.concretetype for v in args]
         resulttype = op.result.concretetype
-        calldescr = self.cpu.calldescrof(argtypes, resulttype)
+        calldescr = self.cpu.calldescrof(argtypes[1:], resulttype)
         self.emit('residual_call_%s' % getkind(resulttype))
         self.emit(calldescr)
         self.emit_varargs(args)



More information about the Pypy-commit mailing list