Messages in this thread | | | Date | Thu, 11 Feb 2021 06:39:07 -0600 | From | Segher Boessenkool <> | Subject | Re: [PATCH] powerpc/bug: Remove specific powerpc BUG_ON() |
| |
On Thu, Feb 11, 2021 at 01:26:12PM +0100, Christophe Leroy wrote: > >What PowerPC cpus implement branch folding? I know none. > > Extract from powerpc mpc8323 reference manual:
> — Zero-cycle branch capability (branch folding)
Yeah, this is not what is traditionally called branch folding (which stores the instruction being branched to in some cache, originally the instruction cache itself; somewhat similar (but different) to the BTIC on 750). Overloaded terminology :-)
6xx/7xx CPUs had the branch execution unit in the frontend, and it would not issue a branch at all if it could be resolved then already. Power4 and later predict all branches, and most are not issued at all (those that do need to be executed, like bdnz, are). At completion time it is checked if the prediction was correct (and corrective action is taken if not).
Segher
| |