Commits

Antonio Cuni committed 73fb5c0

what is not tested is broken...: test&fix for llong_lshift

Comments (0)

Files changed (2)

pypy/translator/cli/opcodes.py

     'llong_ge':                 _not('clt'),
     'llong_and':                'and',
     'llong_or':                 'or',
-    'llong_lshift':             'shl',
+    'llong_lshift':             [PushAllArgs, 'conv.i4', 'shl'],
     'llong_rshift':             [PushAllArgs, 'conv.i4', 'shr'],
     'llong_xor':                'xor',
 

pypy/translator/oosupport/test_template/operations.py

             return x >> y
         assert self.interpret(fn, [r_longlong(32), 1]) == 16
 
+    def test_lshift(self):
+        def fn(x, y):
+            return x << y
+        assert self.interpret(fn, [r_longlong(32), 1]) == 64
+
     def test_uint_neg(self):
         def fn(x):
             return -x