forked from M-Labs/artiq
1
0
Fork 0

compiler/ir: add binary AND and OR

This commit is contained in:
Sebastien Bourdeauducq 2014-07-23 17:10:12 -06:00
parent 1d8eb121b3
commit b2bb837d22
1 changed files with 5 additions and 1 deletions

View File

@ -28,8 +28,12 @@ _binop_to_builder = {
ast.Mult: "mul", ast.Mult: "mul",
ast.FloorDiv: "sdiv", ast.FloorDiv: "sdiv",
ast.Mod: "srem", ast.Mod: "srem",
ast.LShift: "shl", ast.LShift: "shl",
ast.RShift: "ashr" ast.RShift: "ashr",
ast.BitAnd: "and_",
ast.BitOr: "or_",
} }
def _emit_expr(env, builder, ns, node): def _emit_expr(env, builder, ns, node):