[pypy-svn] r30123 - in pypy/dist/pypy/translator/cli: . test

antocuni at codespeak.net antocuni at codespeak.net
Mon Jul 17 15:13:19 CEST 2006


Author: antocuni
Date: Mon Jul 17 15:13:12 2006
New Revision: 30123

Modified:
   pypy/dist/pypy/translator/cli/opcodes.py
   pypy/dist/pypy/translator/cli/test/test_op.py
Log:
Added support for llong_and.



Modified: pypy/dist/pypy/translator/cli/opcodes.py
==============================================================================
--- pypy/dist/pypy/translator/cli/opcodes.py	(original)
+++ pypy/dist/pypy/translator/cli/opcodes.py	Mon Jul 17 15:13:12 2006
@@ -190,6 +190,7 @@
     'llong_ne':                 _not('ceq'),
     'llong_gt':                 'cgt',
     'llong_ge':                 _not('clt'),
+    'llong_and':                'and',
 
     'ullong_is_true':            [PushAllArgs, 'ldc.i8 0', 'cgt.un'],
     'ullong_neg':                None,

Modified: pypy/dist/pypy/translator/cli/test/test_op.py
==============================================================================
--- pypy/dist/pypy/translator/cli/test/test_op.py	(original)
+++ pypy/dist/pypy/translator/cli/test/test_op.py	Mon Jul 17 15:13:12 2006
@@ -26,6 +26,11 @@
         assert self.interpret(fn, [10, 3]) == 1
         assert self.interpret(fn, [10, 0]) == -2
 
+    def test_llong_and(self):
+        def fn(x, y):
+            return x & y
+        assert self.interpret(fn, [r_longlong(10), r_longlong(11)]) == 10
+
 
 def test_op():
     yield check, op_any_ge, [int, int], (42, 42)



More information about the Pypy-commit mailing list