[pypy-svn] r53275 - in pypy/branch/jit-hotpath/pypy/jit/codegen/ia32: . test

fijal at codespeak.net fijal at codespeak.net
Thu Apr 3 08:35:13 CEST 2008


Author: fijal
Date: Thu Apr  3 08:35:12 2008
New Revision: 53275

Modified:
   pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/rgenop.py
   pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/test/test_rgenop.py
Log:
first overflow test passes


Modified: pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/rgenop.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/rgenop.py	(original)
+++ pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/rgenop.py	Thu Apr  3 08:35:12 2008
@@ -421,6 +421,11 @@
         genmethod = getattr(self, 'op_' + opname)
         return genmethod(gv_arg1, gv_arg2)
 
+    @specialize.arg(1)
+    def genraisingop2(self, opname, gv_arg1, gv_arg2):
+        genmethod = getattr(self, 'op_' + opname)
+        return genmethod(gv_arg1, gv_arg2)
+
     def genop_getfield(self, (offset, fieldsize), gv_ptr):
         self.mc.MOV(edx, gv_ptr.operand(self))
         if fieldsize == WORD:
@@ -642,7 +647,9 @@
         return res
 
     def returnboolvar(self, op):
-        if isinstance(op, IMM8):
+        if op is eax:
+            pass
+        elif isinstance(op, IMM8):
             self.mc.MOV(eax, op)
         else:
             self.mc.MOVZX(eax, op)
@@ -686,6 +693,12 @@
         self.mc.ADD(eax, gv_y.operand(self))
         return self.returnintvar(eax)
 
+    def op_int_add_ovf(self, gv_x, gv_y):
+        self.mc.MOV(eax, gv_x.operand(self))
+        self.mc.ADD(eax, gv_y.operand(self))
+        self.mc.SETO(dl)
+        return self.returnintvar(eax), self.returnboolvar(dl)
+
     def op_int_sub(self, gv_x, gv_y):
         self.mc.MOV(eax, gv_x.operand(self))
         self.mc.SUB(eax, gv_y.operand(self))

Modified: pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/test/test_rgenop.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/test/test_rgenop.py	(original)
+++ pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/test/test_rgenop.py	Thu Apr  3 08:35:12 2008
@@ -21,11 +21,7 @@
     test_read_frame_place_direct = skipped
     test_frame_vars_like_the_frontend_direct = skipped
 
-    # unsupported operations
-    #test_genzeroconst = skipped
-
     # overflow
-    test_ovfcheck_adder_direct = skipped
     test_ovfcheck1_direct = skipped
     test_ovfcheck2_direct = skipped
 


More information about the pypy-svn mailing list