Article View: comp.arch
Article #443Register windows (was: Why VAX Was the Ultimate CISC and Not RISC)
From: Anton Ertl
Date: Thu, 29 Oct 2026 16:11
Date: Thu, 29 Oct 2026 16:11
81 lines
4693 bytes
4693 bytes
MitchAlsup <user5857@newsgrouper.org.invalid> writes:
>Thomas Koenig <tkoenig@netcologne.de> posted:
>
>> John Levine <johnl@taugh.com> schrieb:
[IBM 801]
>> They had subroutines for register save and restore, which of course
>> helps code density, but is a bit... iffy.
>
>So iffy that essentially nobody does register windows anymore.
The IBM 801 did not do register windows, either.
>The compiler is at least as good at it as an exception-called
>save/restore machine. {Both V8 and V9}
If we stay with in-order machines, the SPARC register windows have two
disadvantages that are not necessary:
1) Every window has a fixed 16 registers, resulting in less utilization
of a given number of registers (and more need for saving/restoring
to memory) and possibly extra spilling needed for functions with
particularly high register pressure, compared to a more flexible
scheme.
2) Using exceptions for the saving and restoring gives away some of
the potential speed advantage of register windows. That does not
affect user space, so getting rid of that should have been not that
hard, but AFAIK it did not happen for SPARC, so maybe it was hard
(cf. the IA-64 problems).
The AMD 29K and IA-64 deal with 1) by being more flexible. IA-64 was
intended to deal with 2) with its hardware stack engine, but according
to John Dallman they botched it, and fell back to exceptions as a
recourse. Apparently it is not an easy feature to implement, which is
somewhat surprising given that OoO seems conceptually more complex,
and the microarchitects have managed to get it right pretty much every
time.
There is a third issue: Do you pass arguments in the register windows,
or in what SPARC calls global registers? AFAIK SPARC chose to pass
them in windows, but that means that a call sequence like
int foo(a,b)
{
...
bar(a,b);
...
}
has to copy a and b between in and out, while using globals for
arguments would avoid that (but would require saving the arguments in
some way if they are used after the call, the same as without register
windows).
Once we consider OoO, the potential advantages of register windows
become even smaller:
1) OoO can make the stores and loads around calls and returns cheaper:
If the front end runs far ahead of the execution engine (the usual
case), the stores can start as soon as the values are ready (and if
they are ready late, the store waits without delaying anything
else), and independent loads can start early. So ideally they
don't get into the way of the useful instructions.
2) On recent designs, zero-cycle store-to-load forwarding means that
even storing and loading around short function calls may have little
or no latency penalty.
And register windows tend to cost more in OoO implementations: the
register address table (for implementations with a separate renamer)
becomes larger.
My memory says that the OoO implementations of HAL/Fujitsu used the
minimum number of register windows allowed, probably due to a
combination of the cost and the smaller benefits. However, the number
of exceptions would increase.
- anton
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
Technical Details
Message-ID:
<2026Oct29.171118@mips.complang.tuwien.ac.at>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<vpufbv$4qc5$1@dont-email.me> <1792870082-5857@newsgrouper.org> <11bj58a$327li$1@dont-email.me> <2026Oct26.193309@mips.complang.tuwien.ac.at> <11bob96$3af$2@gal.iecc.com> <11bpggu$1961c$1@dont-email.me> <1793120292-5857@newsgrouper.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: anton@mips.complang.tuwien.ac.at (Anton Ertl) Newsgroups: comp.arch Subject: Register windows (was: Why VAX Was the Ultimate CISC and Not RISC) Date: Thu, 29 Oct 2026 16:11:18 GMT Organization: Institut fuer Computersprachen, Technische Universitaet Wien Lines: 81 Message-ID: <2026Oct29.171118@mips.complang.tuwien.ac.at> References: <vpufbv$4qc5$1@dont-email.me> <1792870082-5857@newsgrouper.org> <11bj58a$327li$1@dont-email.me> <2026Oct26.193309@mips.complang.tuwien.ac.at> <11bob96$3af$2@gal.iecc.com> <11bpggu$1961c$1@dont-email.me> <1793120292-5857@newsgrouper.org> Injection-Date: Thu, 29 Oct 2026 16:56:13 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3718811"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19PrUcqnaIZsheN5vEfqIPk"; posting-host="5ad9f9b19fb54b6c0af64c25657e7760" Cancel-Lock: sha1:pks9zlXLDdekFva+McgmncpUNZU= sha256:6u84V+++OjQ2gjiQyRcU5JVkcyLWxMyHxYKmdtLAbFQ= sha1:2l5WGUrNXVMy0QSWu4LAzb104yA= sha256:PZL9MorBzmJBhZ6IDLp8NOZeiz5kH23K+VCZx94ioVw= X-newsreader: xrn 10.11