[pypy-svn] r36627 - in pypy/dist/pypy/jit/codegen/llvm: . test

ericvrp at codespeak.net ericvrp at codespeak.net
Fri Jan 12 22:50:23 CET 2007


Author: ericvrp
Date: Fri Jan 12 22:50:17 2007
New Revision: 36627

Modified:
   pypy/dist/pypy/jit/codegen/llvm/rgenop.py
   pypy/dist/pypy/jit/codegen/llvm/test/test_genc_exception.py
   pypy/dist/pypy/jit/codegen/llvm/test/test_genc_ts.py
   pypy/dist/pypy/jit/codegen/llvm/test/test_genc_vlist.py
Log:
more passing tests in jit/codegen/llvm


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	Fri Jan 12 22:50:17 2007
@@ -536,11 +536,12 @@
         gv_comp    = Var(i1)
         gv_abs_pos = Var(gv_x.type)
         gv_result  = Var(gv_x.type)
-        if nullstr == '0':
-            l = ' %s=' + scmp + 'ge %s,%s'
+        if nullstr == 'null' or nullstr == '0':
+            cmp = scmp
         else:
-            l = ' %s=' + fcmp + 'ge %s,%s'
-        self.asm.append(l % (gv_comp.operand2(), gv_x.operand(), nullstr))
+            cmp = fcmp
+        self.asm.append(' %s=%sge %s,%s' % (
+            gv_comp.operand2(), cmp, gv_x.operand(), nullstr))
         self.asm.append(' %s=sub %s %s,%s' % (
             gv_abs_pos.operand2(), gv_x.type, nullstr, gv_x.operand2()))
         self.asm.append(' %s=select %s,%s,%s' % (
@@ -679,21 +680,23 @@
     def _is_false(self, gv_x, nullstr='0'):
         log('%s Builder._is_false %s' % (self.block.label, gv_x.operand()))
         gv_result = Var(i1)
-        if nullstr == '0':
-            l = ' %s=' + icmp + 'eq %s,%s'
+        if nullstr == 'null' or nullstr == '0':
+            cmp = icmp
         else:
-            l = ' %s=' + fcmp + 'eq %s,%s'
-        self.asm.append(l % (gv_result.operand2(), gv_x.operand(), nullstr))
+            cmp = fcmp
+        self.asm.append(' %s=%seq %s,%s' % (
+            gv_result.operand2(), cmp, gv_x.operand(), nullstr))
         return gv_result
 
     def _is_true(self, gv_x, nullstr='0'):
         log('%s Builder._is_true %s' % (self.block.label, gv_x.operand()))
         gv_result = Var(i1)
-        if nullstr == '0':
-            l = ' %s=' + icmp + 'ne %s,%s'
+        if nullstr == 'null' or nullstr == '0':
+            cmp = icmp
         else:
-            l = ' %s=' + fcmp + 'ne %s,%s'
-        self.asm.append(l % (gv_result.operand2(), gv_x.operand(), nullstr))
+            cmp = fcmp
+        self.asm.append(' %s=%sne %s,%s' % (
+            gv_result.operand2(), cmp, gv_x.operand(), nullstr))
         return gv_result
 
     op_bool_is_true = op_char_is_true = op_unichar_is_true = op_int_is_true =\

Modified: pypy/dist/pypy/jit/codegen/llvm/test/test_genc_exception.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/llvm/test/test_genc_exception.py	(original)
+++ pypy/dist/pypy/jit/codegen/llvm/test/test_genc_exception.py	Fri Jan 12 22:50:17 2007
@@ -2,7 +2,6 @@
 from pypy.jit.timeshifter.test import test_exception
 from pypy.jit.codegen.llvm.test.test_genc_ts import LLVMTimeshiftingTestMixin
 
-py.test.skip("WIP")
 
 class TestException(LLVMTimeshiftingTestMixin,
                     test_exception.TestException):

Modified: pypy/dist/pypy/jit/codegen/llvm/test/test_genc_ts.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/llvm/test/test_genc_ts.py	(original)
+++ pypy/dist/pypy/jit/codegen/llvm/test/test_genc_ts.py	Fri Jan 12 22:50:17 2007
@@ -28,9 +28,4 @@
         test_green_char_at_merge = skip #segfault
         test_residual_red_call_with_exc = skip
     else: #needs fixing for >= 2.0
-        test_red_array = skip
-        test_red_struct_array = skip
-        test_red_varsized_struct = skip
         test_array_of_voids = skip
-        test_merge_structures = skip
-        test_green_char_at_merge = skip

Modified: pypy/dist/pypy/jit/codegen/llvm/test/test_genc_vlist.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/llvm/test/test_genc_vlist.py	(original)
+++ pypy/dist/pypy/jit/codegen/llvm/test/test_genc_vlist.py	Fri Jan 12 22:50:17 2007
@@ -3,12 +3,13 @@
 from pypy.jit.codegen.llvm.test.test_genc_ts import LLVMTimeshiftingTestMixin
 
 
-py.test.skip('WIP')
-
 class TestVList(LLVMTimeshiftingTestMixin,
                 test_vlist.TestVList):
 
     # for the individual tests see
     # ====> ../../../timeshifter/test/test_vlist.py
 
-    pass
+    def skip(self):
+        py.test.skip("WIP")
+
+    test_force = skip



More information about the Pypy-commit mailing list