[pypy-svn] r36702 - pypy/dist/pypy/jit/codegen/llvm
ericvrp at codespeak.net
ericvrp at codespeak.net
Sat Jan 13 23:15:06 CET 2007
Author: ericvrp
Date: Sat Jan 13 23:15:04 2007
New Revision: 36702
Modified:
pypy/dist/pypy/jit/codegen/llvm/compatibility.py
pypy/dist/pypy/jit/codegen/llvm/rgenop.py
Log:
inttoptr casts support
Modified: pypy/dist/pypy/jit/codegen/llvm/compatibility.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/llvm/compatibility.py (original)
+++ pypy/dist/pypy/jit/codegen/llvm/compatibility.py Sat Jan 13 23:15:04 2007
@@ -6,7 +6,7 @@
if llvm_version() < 2.0:
icmp = scmp = ucmp = fcmp = 'set'
- inttoptr = trunc = zext = bitcast = 'cast'
+ inttoptr = trunc = zext = bitcast = inttoptr = 'cast'
shr_prefix = ['', '']
i8 = 'ubyte'
i16 = 'short'
@@ -22,6 +22,7 @@
trunc = 'trunc'
zext = 'zext'
bitcast = 'bitcast'
+ inttoptr = 'inttoptr'
shr_prefix = ['l', 'a']
define = 'define'
i8 = 'i8'
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 Sat Jan 13 23:15:04 2007
@@ -9,7 +9,7 @@
from pypy.jit.codegen.i386.rgenop import gc_malloc_fnaddr
from pypy.jit.codegen.llvm.conftest import option
from pypy.jit.codegen.llvm.compatibility import icmp, scmp, ucmp, fcmp, inttoptr,\
- trunc, zext, bitcast, shr_prefix, define, i1, i8, i16, i32, f64
+ trunc, zext, bitcast, inttoptr, shr_prefix, define, i1, i8, i16, i32, f64
pi8 = i8 + '*'
@@ -902,7 +902,7 @@
if isinstance(gv_fnptr, AddrConst):
gv_fn = Var(self._funcsig_type(args_gv, restype) + '*')
self.asm.append(' %s=%s %s %s to %s' % (
- gv_fn.operand2(), bitcast, i32, gv_fnptr.operand2(), gv_fn.type))
+ gv_fn.operand2(), inttoptr, i32, gv_fnptr.operand2(), gv_fn.type))
funcsig = gv_fn.operand()
else:
#XXX we probably need to call an address directly if we can't resolve the funcsig
More information about the Pypy-commit
mailing list