[pypy-svn] r65637 - in pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm: . test

arigo at codespeak.net arigo at codespeak.net
Sun Jun 7 14:32:47 CEST 2009


Author: arigo
Date: Sun Jun  7 14:32:46 2009
New Revision: 65637

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_ovf_operations_reversed.


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 14:32:46 2009
@@ -13,6 +13,7 @@
 
 
 class LLVMCPU(model.AbstractCPU):
+    is_oo = False
     RAW_VALUE = rffi.CFixedArray(rffi.ULONGLONG, 1)
     SIGNED_VALUE = rffi.CFixedArray(lltype.Signed, 1)
 
@@ -452,6 +453,21 @@
                                           self.cpu.const_null, "")
         self._generate_guard(op, eisnull, False, exc=True)
 
+    def generate_GUARD_EXCEPTION(self, op):
+        v = op.args[0]
+        assert isinstance(v, ConstInt)
+        expectedtype = self.cpu._make_const_ptr(v.getint())
+        etype = llvm_rffi.LLVMBuildLoad(self.builder,
+                                        self.cpu.const_exc_type, "")
+        eisequal = llvm_rffi.LLVMBuildICmp(self.builder,
+                                           llvm_rffi.Predicate.EQ,
+                                           etype,
+                                           expectedtype, "")
+        self._generate_guard(op, eisequal, False, exc=True)
+        self.vars[op.result] = llvm_rffi.LLVMBuildLoad(self.builder,
+                                                      self.cpu.const_exc_value,
+                                                      "")
+
     def _generate_guard(self, op, verify_condition, reversed, exc=False):
         func = self.compiling_func
         bb_on_track = llvm_rffi.LLVMAppendBasicBlock(func, "")

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 14:32:46 2009
@@ -17,7 +17,6 @@
 
     test_do_call = _skip
     test_executor = _skip
-    test_ovf_operations_reversed = _skip
     test_passing_guards = _skip
     test_passing_guard_class = _skip
     test_failing_guards = _skip



More information about the Pypy-commit mailing list