My high-level understanding of the Intel front-end is as follows. It is mostly vague and could be wrong.
A branch predictor determines the next address to fetch instructions from.
Sometimes a signal comes from the backend "branch foo was predicted wrong", causing a pipeline flush and resteer.
The instruction fetch unit fetches up to 16 bytes at a time
These go through various stages of decoding, until ultimately, the decode units issue μops that flow to the RAT, ROB, and then the backend.
However, the μops corresponding to complex instructions like
div
cannot be directly emitted by any decode unit. When the decode unit detects one of these, it signals the Microcode Sequencer ROM, and μops are issued from there until the instruction is finished being decoded.
My question is: can the MSROM issue branchs? If so, how do they work? Since this is all happening downstream of the branch predictor, which works on (architectural) instructions, how does it know which way to go? Does it just stall after it issues a branch until the backend finishes executing it and it knows whether the condition is true? Does it have some sort of rudimentary static prediction? Or is it actually fed by the the "real" branch predictor somehow, just like the actual architectural instruction stream is?