Speculative Execution and Rollback

When a branch misprediction is detected, how does an out-of-order processor undo the speculatively executed instructions?

A

It's impossible — mispredicted results are permanently committed

B

It restarts the entire program from the beginning

C

It flushes the pipeline and discards uncommitted results from speculative instructions

D

It writes compensation instructions that reverse each speculative operation