Sujet : Re: register sets
De : quadibloc (at) *nospam* invalid.invalid (John Savard)
Groupes : comp.archDate : 15. Jul 2025, 05:49:55
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <1054mlj$3svsg$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
User-Agent : Pan/0.146 (Hic habitat felicitas; d7a48b4 gitlab.gnome.org/GNOME/pan.git)
On Wed, 16 Apr 2025 23:42:20 -0400, Robert Finch wrote:
Another thought is to not include float registers for anything other
than apps. It would save 32 regs per mode, possibly allowing three
register sets to be provided.
I had to re-read this to understand it.
Some architectures in the past did speed up context-switching between
user programs and the operating system by giving the operating system
its own set of registers.
And the operating system doesn't need to do floating-point math, only
user programs that do calculations. So what could go wrong with this
great idea?
The first thing that comes to mind is that even a computer with a GUI,
not merely a time-sharing mainframe, may have multiple user programs
running at once. So when a real-time clock interrupt hits, and it's
time to rotate from one compute-bound user program to another, those
floating-point registers *also* need to be saved to memory.
So you will probably need an outer ring of the OS that doesn't use
the special OS-specific set of registers.
John Savard