[pypy-svn] r65644 - in pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm: . test
arigo at codespeak.net
arigo at codespeak.net
Sun Jun 7 17:22:22 CEST 2009
Author: arigo
Date: Sun Jun 7 17:22:21 2009
New Revision: 65644
Modified:
pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/llvm_rffi.py
pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/runner.py
pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/test/test_runner.py
Log:
test_casts.
Modified: pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/llvm_rffi.py
==============================================================================
--- pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/llvm_rffi.py (original)
+++ pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/llvm_rffi.py Sun Jun 7 17:22:21 2009
@@ -240,6 +240,12 @@
LLVMTypeRef, # destination type
rffi.CCHARP], # name of result
LLVMValueRef)
+LLVMBuildPtrToInt = llexternal('LLVMBuildPtrToInt',
+ [LLVMBuilderRef, # builder
+ LLVMValueRef, # value
+ LLVMTypeRef, # destination type
+ rffi.CCHARP], # name of result
+ LLVMValueRef)
LLVMBuildIntToPtr = llexternal('LLVMBuildIntToPtr',
[LLVMBuilderRef, # builder
LLVMValueRef, # value
Modified: pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/runner.py
==============================================================================
--- pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/runner.py (original)
+++ pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/runner.py Sun Jun 7 17:22:21 2009
@@ -721,6 +721,18 @@
res, mask, "")
self.vars[op.result] = res
+ def generate_CAST_PTR_TO_INT(self, op):
+ res = llvm_rffi.LLVMBuildPtrToInt(self.builder,
+ self.getptrarg(op.args[0]),
+ self.cpu.ty_int, "")
+ self.vars[op.result] = res
+
+ def generate_CAST_INT_TO_PTR(self, op):
+ res = llvm_rffi.LLVMBuildIntToPtr(self.builder,
+ self.getintarg(op.args[0]),
+ self.cpu.ty_char_ptr, "")
+ self.vars[op.result] = res
+
# ____________________________________________________________
class MissingOperation(Exception):
Modified: pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/test/test_runner.py
==============================================================================
--- pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/test/test_runner.py (original)
+++ pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/test/test_runner.py Sun Jun 7 17:22:21 2009
@@ -17,5 +17,4 @@
test_do_call = _skip
test_executor = _skip
- test_casts = _skip
test_ooops_non_gc = _skip
More information about the Pypy-commit
mailing list