CPUs split one instruction into several micro-ops, this works for x86 and ARM cores and maybe several other architectures. Micro-ops could be executed out-of-order and are stored in a ROB. They are retired in-order from this ROB.
How does a CPU handle asynchronous interrupts?
I think of 2 possible implementations:
- CPU will continue executing all micro-ops which are already in ROB, temporally ignoring the coming interrupt.
- CPU will flush its pipeline. But if the pipeline is flushed, could we face a situation when some micro-ops of an instruction are retired, while other micro-ops of the same instruction are flushed from ROB? And what resources will remain in a pipeline after the interrupt is raise