public static Tile RegReg() { // l = 0 -> first instruction sets reg to 0 // r = 0 but l > 0 -> fourth instruction sets reg to 0 // l > 0 and r > 0 -> first instruction sets reg = l > 0 and nothing changes return(makeBinopTile <LogAndOperatorNode, RegisterNode, RegisterNode> ( (regNode, left, right) => new[] { InstructionFactory.Move(regNode, left), // reg = left InstructionFactory.Xor(left, left), // left = 0 InstructionFactory.Cmp(right, left), // if right == 0 InstructionFactory.Cmove(regNode, left) // then reg = 0 } )); }