[pypy-svn] r59447 - in pypy/branch/oo-jit/pypy/jit/codegen/x86_64: . test
witulski at codespeak.net
witulski at codespeak.net
Mon Oct 27 15:15:37 CET 2008
Author: witulski
Date: Mon Oct 27 15:15:37 2008
New Revision: 59447
Modified:
pypy/branch/oo-jit/pypy/jit/codegen/x86_64/rgenop.py
pypy/branch/oo-jit/pypy/jit/codegen/x86_64/test/test_rgenop.py
Log:
Implemented invert
Modified: pypy/branch/oo-jit/pypy/jit/codegen/x86_64/rgenop.py
==============================================================================
--- pypy/branch/oo-jit/pypy/jit/codegen/x86_64/rgenop.py (original)
+++ pypy/branch/oo-jit/pypy/jit/codegen/x86_64/rgenop.py Mon Oct 27 15:15:37 2008
@@ -249,8 +249,7 @@
self.mc.IDIV(gv_y)
return gv_w
-# def op_int_invert(self, gv_x):
-# return self.mc.NOT(gv_x)
+ op_int_invert = op_int_not
# if a register contains a constant
# it will be marked to be don't spilled
Modified: pypy/branch/oo-jit/pypy/jit/codegen/x86_64/test/test_rgenop.py
==============================================================================
--- pypy/branch/oo-jit/pypy/jit/codegen/x86_64/test/test_rgenop.py (original)
+++ pypy/branch/oo-jit/pypy/jit/codegen/x86_64/test/test_rgenop.py Mon Oct 27 15:15:37 2008
@@ -542,14 +542,14 @@
result = fnptr(42)
assert result == 0
-
-# def test_invert(self):
-# inv_function = make_one_op_instr(self.RGenOp(),"int_invert")
-# fnptr = self.cast(inv_function,1)
-# result = fnptr(0)
-# assert result == 0
-# result = fnptr(1)
-# assert result == -1
+ # does the same as not
+ def test_invert(self):
+ inv_function = make_one_op_instr(self.RGenOp(),"int_invert")
+ fnptr = self.cast(inv_function,1)
+ result = fnptr(0)
+ assert result == -1
+ result = fnptr(-43)
+ assert result == 42
test_switch_many_args_direct = skip
@@ -584,7 +584,6 @@
test_from_random_4_direct = skip
test_from_random_5_direct = skip
test_genzeroconst = skip
- # test_ovfcheck_adder_direct = skip
test_ovfcheck1_direct = skip
test_ovfcheck2_direct = skip
test_cast_direct = skip
More information about the Pypy-commit
mailing list