[pypy-svn] r74157 - in pypy/branch/blackhole-improvement/pypy/jit: codewriter metainterp

arigo at codespeak.net arigo at codespeak.net
Wed Apr 28 13:19:10 CEST 2010


Author: arigo
Date: Wed Apr 28 13:19:08 2010
New Revision: 74157

Modified:
   pypy/branch/blackhole-improvement/pypy/jit/codewriter/jitter.py
   pypy/branch/blackhole-improvement/pypy/jit/metainterp/blackhole.py
Log:
Tweaks.


Modified: pypy/branch/blackhole-improvement/pypy/jit/codewriter/jitter.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/codewriter/jitter.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/codewriter/jitter.py	Wed Apr 28 13:19:08 2010
@@ -136,6 +136,7 @@
     def rewrite_op_cast_int_to_unichar(self, op): raise NoOp
     def rewrite_op_cast_char_to_int(self, op): raise NoOp
     def rewrite_op_cast_unichar_to_int(self, op): raise NoOp
+    def rewrite_op_cast_bool_to_int(self, op): raise NoOp
     def rewrite_op_cast_pointer(self, op): raise NoOp
 
     def rewrite_op_direct_call(self, op):

Modified: pypy/branch/blackhole-improvement/pypy/jit/metainterp/blackhole.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/metainterp/blackhole.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/metainterp/blackhole.py	Wed Apr 28 13:19:08 2010
@@ -281,6 +281,14 @@
         return a & b
 
     @arguments("i", "i", returns="i")
+    def opimpl_int_or(self, a, b):
+        return a | b
+
+    @arguments("i", "i", returns="i")
+    def opimpl_int_xor(self, a, b):
+        return a ^ b
+
+    @arguments("i", "i", returns="i")
     def opimpl_int_floordiv(self, a, b):
         return llop.int_floordiv(lltype.Signed, a, b)
 
@@ -293,6 +301,25 @@
         c = llop.uint_floordiv(lltype.Unsigned, r_uint(a), r_uint(b))
         return intmask(c)
 
+    @arguments("i", "i", returns="i")
+    def opimpl_int_lt(self, a, b):
+        return int(a < b)
+    @arguments("i", "i", returns="i")
+    def opimpl_int_le(self, a, b):
+        return int(a <= b)
+    @arguments("i", "i", returns="i")
+    def opimpl_int_eq(self, a, b):
+        return int(a == b)
+    @arguments("i", "i", returns="i")
+    def opimpl_int_ne(self, a, b):
+        return int(a != b)
+    @arguments("i", "i", returns="i")
+    def opimpl_int_gt(self, a, b):
+        return int(a > b)
+    @arguments("i", "i", returns="i")
+    def opimpl_int_ge(self, a, b):
+        return int(a >= b)
+
     @arguments("i")
     def opimpl_int_return(self, a):
         self.result_i = a
@@ -424,9 +451,9 @@
     @arguments("i", "d", "R", returns="f")
     def opimpl_residual_call_r_f(self, func, calldescr, args_r):
         return self.cpu.bh_call_f(func, calldescr, None, args_r, None)
-    @arguments("i", "d", "R", returns="v")
+    @arguments("i", "d", "R")
     def opimpl_residual_call_r_v(self, func, calldescr, args_r):
-        return self.cpu.bh_call_v(func, calldescr, None, args_r, None)
+        self.cpu.bh_call_v(func, calldescr, None, args_r, None)
 
     @arguments("i", "d", "I", "R", returns="i")
     def opimpl_residual_call_ir_i(self, func, calldescr, args_i, args_r):
@@ -437,9 +464,9 @@
     @arguments("i", "d", "I", "R", returns="f")
     def opimpl_residual_call_ir_f(self, func, calldescr, args_i, args_r):
         return self.cpu.bh_call_f(func, calldescr, args_i, args_r, None)
-    @arguments("i", "d", "I", "R", returns="v")
+    @arguments("i", "d", "I", "R")
     def opimpl_residual_call_ir_v(self, func, calldescr, args_i, args_r):
-        return self.cpu.bh_call_v(func, calldescr, args_i, args_r, None)
+        self.cpu.bh_call_v(func, calldescr, args_i, args_r, None)
 
     @arguments("i", "d", "I", "R", "F", returns="i")
     def opimpl_residual_call_irf_i(self, func, calldescr,args_i,args_r,args_f):
@@ -450,9 +477,9 @@
     @arguments("i", "d", "I", "R", "F", returns="f")
     def opimpl_residual_call_irf_f(self, func, calldescr,args_i,args_r,args_f):
         return self.cpu.bh_call_f(func, calldescr, args_i, args_r, args_f)
-    @arguments("i", "d", "I", "R", "F", returns="v")
+    @arguments("i", "d", "I", "R", "F")
     def opimpl_residual_call_irf_v(self, func, calldescr,args_i,args_r,args_f):
-        return self.cpu.bh_call_v(func, calldescr, args_i, args_r, args_f)
+        self.cpu.bh_call_v(func, calldescr, args_i, args_r, args_f)
 
     @arguments("d", "i", returns="r")
     def opimpl_new_array(self, arraydescr, length):



More information about the Pypy-commit mailing list