A perceptron based branch predictor