[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [f-cpu] Smooth Register backup issues...

----- Original Message -----
From: "Michael Riepe" <michael@stud.uni-hannover.de>
To: <f-cpu@seul.org>
Sent: Friday, November 14, 2003 2:42 AM
Subject: Re: [f-cpu] Smooth Register backup issues...

> I prefer a double-buffering approach: The "shadow" register is loaded
> from the new ("incoming") CMB, while the "foreground" register is
> saved to the old ("outgoing") CMB.  As soon as the shadow is loaded,
> register and shadow can be swapped (by flipping an address or enable
> bit).  That way, a direct connection between a register and its
> shadow counterpart is not required since you never have to transfer
> data between them.  In addition to that, it enables you to process
> interrupts very quickly -- just swap the registers on entry and exit
> of the interrupt service routine.
> Did anybody say "Zilog Z80"? ;)

"exx" and "ex A, A'" ? :-)

To be sure to understand what you mean :

- there are two independant register-sets, only one of which  you can
- when executing a CMB switching, you just implicitely select the other set
so that old registers can be saved in old CMB context, and we can continue
to run code with the new registers without write-back memory delay penalty.
For interrupt, it may be very interesting if we dont need to read the values
of registers ( the stack pointer is fixed-address at raising interrupt ?
what about the reentrance ? ).

Still I see a problem : we must preload the values of new registers from the
new CMB context, especially when switching between tasks. How do you plan
that ? have an explicit instruction to reload the new register set ?


To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/