Sujet : Re: First-Part-Done (was Re: Byte Addressability And Beyond)
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.archDate : 03. Jun 2024, 09:20:48
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v3jud0$3qduu$9@dont-email.me>
References : 1 2 3 4 5
User-Agent : Pan/0.158 (Avdiivka; )
On Thu, 30 May 2024 14:42:14 -0000 (UTC), John Levine wrote:
The condition code tells you which it was. If it was an interrupt, you
just branch back and keep going.
Does it really hurt performance for the CPU to keep track of the fact that
an instruction has to be restarted after an interrupt?
On the old VAX, there was a processor status bit called “First Part Done”,
which was used for interruptible instructions. When an interrupt happened
with such an instruction, the PC was not incremented past the instruction;
instead, the saved PC pointed back at the instruction itself, while the
saved processor status had the FPD bit set.
So on a return from the interrupt, the CPU knew not to redo the
instruction setup, but just continue executing the instruction from the
current register state.