Believe it or not, that's actually a fairly simple part of the whole
machinery. All you need for that is to maintain a call/return stack
in the front end of the pipe. That way, a return that is indeed a
return can be speculated properly; obviously, if the speculation
doesn't work out when you get the return address in the execution
stage you suffer a branch mispredict penalty.
-hpa
-- <hpa@transmeta.com> at work, <hpa@zytor.com> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/