[pypy-svn] r35739 - pypy/dist/pypy/jit/codegen/llvm
ericvrp at codespeak.net
ericvrp at codespeak.net
Thu Dec 14 14:51:17 CET 2006
Author: ericvrp
Date: Thu Dec 14 14:51:16 2006
New Revision: 35739
Modified:
pypy/dist/pypy/jit/codegen/llvm/rgenop.py
Log:
And another int to ptr cast solved.
(this particular test was not run on my OSX machine because the gc library was not found)
Modified: pypy/dist/pypy/jit/codegen/llvm/rgenop.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/llvm/rgenop.py (original)
+++ pypy/dist/pypy/jit/codegen/llvm/rgenop.py Thu Dec 14 14:51:16 2006
@@ -148,7 +148,7 @@
# check the types for debugging
sourcevartypes = [var.type for var in sourcevars]
targetvartypes = [var.type for var in self.inputargs]
- #XXX ERIC assert sourcevartypes == targetvartypes
+ assert sourcevartypes == targetvartypes
# Check if the source block jumps to 'self' from multiple
# positions: in this case we need an intermediate block...
@@ -602,7 +602,7 @@
gv_result = Var('ubyte*')
gv_gc_malloc_fnaddr = Var('[0xubyte]* (int)*')
#XXX or use addGlobalFunctionMapping in libllvmjit.restart()
- self.asm.append(' %s=cast int %d to %s ;gc_malloc_fnaddr' % (
+ self.asm.append(' %s=inttoptr int %d to %s ;gc_malloc_fnaddr' % (
gv_gc_malloc_fnaddr.operand2(), gc_malloc_fnaddr(), gv_gc_malloc_fnaddr.type))
self.asm.append(' %s=call %s(int %d)' % (
gv_result.operand2(), gv_gc_malloc_fnaddr.operand(), size))
@@ -626,7 +626,7 @@
gv_result = Var('ubyte*')
gv_gc_malloc_fnaddr = Var('[0xubyte]* (int)*')
#XXX or use addGlobalFunctionMapping in libllvmjit.restart()
- self.asm.append(' %s=cast int %d to %s ;gc_malloc_fnaddr' % (
+ self.asm.append(' %s=inttoptr int %d to %s ;gc_malloc_fnaddr' % (
gv_gc_malloc_fnaddr.operand2(), gc_malloc_fnaddr(), gv_gc_malloc_fnaddr.type))
self.asm.append(' %s=call %s(%s)' % (
gv_result.operand2(), gv_gc_malloc_fnaddr.operand(), gv_size.operand()))
More information about the Pypy-commit
mailing list