>> adrp Xn, dest >> add Xn, Xn, :lo12:dest >> blr Xn >> > > I don't suppose the branch predictor would like that very much, > though. Can't you keep the original arrangement, and use this sequence > instead? Or use the new sequence unconditionally, but nop out the add > instruction and change the blr for a straight bl if the target is in > range?
No, the branch predictor is fine with it. The blr Xn always goes to the same address so it is predicted. The adrp/add pair are folded into a single micro op and then dual issued with the bl, so it take exactly the same time as a straight bl. It depends, of course, on your implementation, Regards, Ed. _______________________________________________ linaro-dev mailing list linaro-dev@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-dev