[pypy-svn] r65618 - in pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm: . test
arigo at codespeak.net
arigo at codespeak.net
Sat Jun 6 15:50:10 CEST 2009
Author: arigo
Date: Sat Jun 6 15:50:10 2009
New Revision: 65618
Modified:
pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/runner.py
pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/test/test_runner.py
Log:
test_unary_operations.
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 Sat Jun 6 15:50:10 2009
@@ -254,6 +254,11 @@
"")
''' % (_opname, _llvmname)).compile()
+ def generate_INT_NEG(self, op):
+ self.vars[op.result] = llvm_rffi.LLVMBuildNeg(self.builder,
+ self.getintarg(op.args[0]),
+ "")
+
def generate_INT_INVERT(self, op):
self.vars[op.result] = llvm_rffi.LLVMBuildNot(self.builder,
self.getintarg(op.args[0]),
@@ -297,12 +302,11 @@
def _generate_fail(self, args, index):
self.cpu._ensure_out_args(len(args))
for i in range(len(args)):
- value_ref = self.vars[args[i]]
- ty = llvm_rffi.LLVMTypeOf(value_ref)
- typtr = llvm_rffi.LLVMPointerType(ty, 0)
+ value_ref = self.getintarg(args[i])
addr_as_signed = rffi.cast(lltype.Signed, self.cpu.in_out_args[i])
llvmconstint = self._make_const_int(addr_as_signed)
- llvmconstptr = llvm_rffi.LLVMConstIntToPtr(llvmconstint, typtr)
+ llvmconstptr = llvm_rffi.LLVMConstIntToPtr(llvmconstint,
+ self.cpu.ty_int_ptr)
llvm_rffi.LLVMBuildStore(self.builder, value_ref,
llvmconstptr)
llvm_rffi.LLVMBuildRet(self.builder, self._make_const_int(index))
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 Sat Jun 6 15:50:10 2009
@@ -17,7 +17,6 @@
test_do_call = _skip
test_executor = _skip
- test_unary_operations = _skip
test_ovf_operations = _skip
test_ovf_operations_reversed = _skip
test_passing_guards = _skip
More information about the Pypy-commit
mailing list