From 1b529413812ad6017388d62f2821513ac41f72c1 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 23 Jul 2014 11:48:15 -0600 Subject: [PATCH] compiler/ir: support shifts --- artiq/compiler/ir.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/artiq/compiler/ir.py b/artiq/compiler/ir.py index 046584e58..9a32882a5 100644 --- a/artiq/compiler/ir.py +++ b/artiq/compiler/ir.py @@ -27,7 +27,9 @@ _binop_to_builder = { ast.Sub: "sub", ast.Mult: "mul", ast.FloorDiv: "sdiv", - ast.Mod: "srem" + ast.Mod: "srem", + ast.LShift: "shl", + ast.RShift: "ashr" } def _emit_expr(env, builder, ns, node):