The VAX project started roughly around the time the first RISC
concepts were being researched. Could the VAX have been designed as a
RISC architecture to begin with? Because not doing so meant that, just
over a decade later, RISC architectures took over the rCLreal computerrCY >market and wiped the floor with DECrCOs flagship architecture, >performance-wise.
The answer was no, the VAX could not have been done as a RISC
architecture. RISC wasnrCOt actually price-performance competitive until
the latter 1980s:
/ERROR "unexpected byte sequence starting at index 348: '\xE2'" while decoding/:
On Sat, 1 Mar 2025 08:09:35 -0000 (UTC), Lawrence D'Oliveiro
<ldo@nz.invalid> wrote:
The VAX project started roughly around the time the first RISC
concepts were being researched.
Could the VAX have been designed as a
RISC architecture to begin with?
Because not doing so meant that, just
over a decade later, RISC architectures took over the |o-C-Lreal computer|o-C-Y
market and wiped the floor with DEC|o-C-Os flagship architecture, >performance-wise.
The answer was no, the VAX could not have been done as a RISC
architecture. RISC wasn|o-C-Ot actually price-performance competitive until >the latter 1980s:
Shall we then conclude that DEC did everything right, because later on
after the VAX, DEC came up with the Alpha, which was RISC, and which
was the highest-performing chip of its day?
Well, not everything. The Alpha was so expensive as to be a dismal--- Synchronet 3.22a-Linux NewsLink 1.2
failure in the market. However, it was either good enough, or
well-documented enough, for some Chinese efforts at home-grown
computer design to have copied it.
John Savard
quadibloc@invalid.com (John Savard) posted:
/ERROR "unexpected byte sequence starting at index 348: '\xE2'" while decoding/:
On Sat, 1 Mar 2025 08:09:35 -0000 (UTC), Lawrence D'Oliveiro
<ldo@nz.invalid> wrote:
The VAX project started roughly around the time the first RISC
concepts were being researched.
I remember walking by a CS conference room 1973-ish and listening to
a bunch of people (including Bill Wolfe and Aho) at Carnegie Mellon.
The discussion was about a follow on to the PDP-11 architectures
and what additional address modes should go in or not.
So, my memory is that VAX was being fleshed out at least 7 years
before RISC got started.
Could the VAX have been designed as a
RISC architecture to begin with?
Not with the players involved. Now, if Thronton or Seymore was at CMU
then maybe.
Because not doing so meant that, just
over a decade later, RISC architectures took over the ??????real computer??????
market and wiped the floor with DEC??????s flagship architecture,
performance-wise.
The answer was no, the VAX could not have been done as a RISC
architecture. RISC wasn??????t actually price-performance competitive until >> >the latter 1980s:
Once compilers made significant growth in optimization, and sufficient silicon area became available.
The commercial success of VAX delayed Alpha--no doubt about that.
So, I contend, DEC misplayed that card.
On Sat, 24 Oct 2026 19:28:02 GMT, MitchAlsup wrote:
The commercial success of VAX delayed Alpha--no doubt about that.
So, I contend, DEC misplayed that card.
But DEC did bring out their first Unix-based RISC product in 1989 --
the MIPS-based DECstation. But there was still internal feuding
between the rCLUnix Is Snake OilrCY camp (led by Ken Olsen himself) and
the rCLCustomers Want An Open OSrCY camp, which prevented the company committing wholesale to the latter viewpoint.
The holdouts were not completely neutralized until Ken OlsenrCOs time as
CEO came to an end.
quadibloc@invalid.com (John Savard) posted:
/ERROR "unexpected byte sequence starting at index 348: '\xE2'" while decoding/:
On Sat, 1 Mar 2025 08:09:35 -0000 (UTC), Lawrence D'Oliveiro
<ldo@nz.invalid> wrote:
The VAX project started roughly around the time the first RISC
concepts were being researched.
I remember walking by a CS conference room 1973-ish and listening to
a bunch of people (including Bill Wolfe and Aho) at Carnegie Mellon.
The discussion was about a follow on to the PDP-11 architectures
and what additional address modes should go in or not.
So, my memory is that VAX was being fleshed out at least 7 years
before RISC got started.
RISC architecture to begin with?
Not with the players involved. Now, if Thronton or Seymore was at CMU
then maybe.
Because not doing so meant that, just
over a decade later, RISC architectures took over the |o-C-Lreal computer|o-C-Y
market and wiped the floor with DEC|o-C-Os flagship architecture,
performance-wise.
The answer was no, the VAX could not have been done as a RISC
architecture. RISC wasn|o-C-Ot actually price-performance competitive until >>> the latter 1980s:
Once compilers made significant growth in optimization, and sufficient silicon area became available.
Shall we then conclude that DEC did everything right, because later on
after the VAX, DEC came up with the Alpha, which was RISC, and which
was the highest-performing chip of its day?
The commercial success of VAX delayed Alpha--no doubt about that. So, I contend, DEC misplayed that card.
Well, not everything. The Alpha was so expensive as to be a dismal
failure in the market. However, it was either good enough, or
well-documented enough, for some Chinese efforts at home-grown
computer design to have copied it.
John Savard
Recall my prior post of the article from Electronics about memory prices >circa 1973 being about 10 cents per byte (in 1973 cents) as that would >strongly influence any architecture and ISA design decisions.
The 801 was a RISC largely because that was the
code that the PL.8 compiler generated.
I recall reading somwhere that when they wrote a S/360 code generator
for PL.8, its code ran much faster than the regular PL/I compilers because
it mostly used a RISC-ish subset of the 360 instruction set that ran fast.
On 2026-Oct-24 15:28, MitchAlsup wrote:[...]
Once compilers made significant growth in optimization, and sufficient
silicon area became available.
So compilers were already emitting risc-ish code.
Shall we then conclude that DEC did everything right, because later on
after the VAX, DEC came up with the Alpha, which was RISC, and which
was the highest-performing chip of its day?
Well, not everything. The Alpha was so expensive as to be a dismal
failure in the market.
quadibloc@invalid.com (John Savard) posted:
Could the VAX have been designed as a
RISC architecture to begin with?
Not with the players involved. Now, if Thronton or Seymore was at CMU
then maybe.
Once compilers made significant growth in optimization, and sufficient >silicon area became available.
Again, the 801 proved that it could be done. I think they also
invented graph coloring for register allocation, or if they did
not invent it, they certainly used it.
quadibloc@invalid.com (John Savard) writes:
Shall we then conclude that DEC did everything right, because later on >>after the VAX, DEC came up with the Alpha, which was RISC, and which
was the highest-performing chip of its day?
If DEC did everything right, why is there no DEC now?
Well, not everything. The Alpha was so expensive as to be a dismal
failure in the market.
They did not sell as many as they needed, and they were more expensive
than Intel-based PCs, and eventually Intel and AMD ate all the RISCs
in general-purpose computing, except, probably thanks to iSeries,
Power. Price may have had to do with it.
The fact that Intel and AMD could ramp up the speed faster than Alpha >probably was the nail in the coffin.
Yeah, IIUC the need to have better compilers wasn't because >compiler-generated RISC code would not be competitive with
compiler-generated CISC code, but because CISC assembler was supposed to
be comfortable whereas RISC assembler was supposed to be painful to use,
so RISC would be palatable only if exposure to assembler was reduced
(hence the need for better compilers).
However, graph coloring register allocation is not necessary for a
RISC to outperform the VAX 11/780, pipelining is enough. The Berkeley
RISC people were a hardware group and did not do optimizing compilers.
Stefan Monnier <monnier@iro.umontreal.ca> writes:
Yeah, IIUC the need to have better compilers wasn't because
compiler-generated RISC code would not be competitive with
compiler-generated CISC code, but because CISC assembler was supposed to
be comfortable whereas RISC assembler was supposed to be painful to use,
so RISC would be palatable only if exposure to assembler was reduced
(hence the need for better compilers).
RISC assembly languages are not painful; on the contrary, they are
relatively easy. I can imagine that assembly programmers resented the devaluing of their skill of making good use of the addressing modes,
and CISCy features of an instruction set. Instead, delay slots meant
that a new skill had to be learned for some assembly languages. The
MIPS assembler took care of the delay slots, however.
Anyway, as memories grew, high-level languages gained relevance.
RISCs have a performance advantage over VAX-11/780 in assembly
language, with simple compilers, and with optimizing compilers, thanks
to pipelining (and the 11/780's high CPI). The memory consumption
with simple compilers may have resulted in bad code density for a
RISCy VAX, and that would have delayed the moved to high-level
languages by a short while, but I still think that a RISCy VAX would
have been better for DEC and their customers.
- anton
anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
quadibloc@invalid.com (John Savard) writes:
Shall we then conclude that DEC did everything right, because later on
after the VAX, DEC came up with the Alpha, which was RISC, and which
was the highest-performing chip of its day?
If DEC did everything right, why is there no DEC now?
Well, not everything. The Alpha was so expensive as to be a dismal
failure in the market.
They did not sell as many as they needed, and they were more expensive
than Intel-based PCs, and eventually Intel and AMD ate all the RISCs
in general-purpose computing, except, probably thanks to iSeries,
Power. Price may have had to do with it.
The fact that Intel and AMD could ramp up the speed faster than Alpha
probably was the nail in the coffin.
Alpha's weak memory model didn't help sell chips, either.
On 10/26/2026 11:53 AM, Scott Lurndal wrote:
anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
quadibloc@invalid.com (John Savard) writes:
Shall we then conclude that DEC did everything right, because later on >>>> after the VAX, DEC came up with the Alpha, which was RISC, and which
was the highest-performing chip of its day?
If DEC did everything right, why is there no DEC now?
Well, not everything. The Alpha was so expensive as to be a dismal
failure in the market.
They did not sell as many as they needed, and they were more expensive
than Intel-based PCs, and eventually Intel and AMD ate all the RISCs
in general-purpose computing, except, probably thanks to iSeries,
Power.-a Price may have had to do with it.
The fact that Intel and AMD could ramp up the speed faster than Alpha
probably was the nail in the coffin.
Alpha's weak memory model didn't help sell chips, either.
Alpha was a little too weak...
If DEC did everything right, why is there no DEC now?
The fact that Intel and AMD could ramp up the speed faster than
Alpha probably was the nail in the coffin.
It was interesting to me that Windows can run on an Alpha:
https://betawiki.net/wiki/Draft:Installing_Windows_NT_on_DEC_Alpha
It appears that Anton Ertl <anton@mips.complang.tuwien.ac.at> said:
However, graph coloring register allocation is not necessary for a
RISC to outperform the VAX 11/780, pipelining is enough. The Berkeley
RISC people were a hardware group and did not do optimizing compilers.
They sure didn't. They invented register windows because PCC's
register allocator saved and restored lots of registers around
every call, and the windows made that faster. On the 801, they
just saved what they needed to so they didn't even have load or
store multiple.
It was interesting to me that Windows can run on an Alpha:
https://betawiki.net/wiki/Draft:Installing_Windows_NT_on_DEC_Alpha
MitchAlsup <user5857@newsgrouper.org.invalid> writes:
quadibloc@invalid.com (John Savard) posted:
Could the VAX have been designed as a
RISC architecture to begin with?
Not with the players involved. Now, if Thronton or Seymore was at CMU
then maybe.
The 801 was designed at around the same time as the VAX 11/780, and
the CDC6600 had been designed more than a decade earlier. EricP has
reported on his design of a RISC with the kind of technology that the
VAX was built from. It's pretty obvious that it was possible, and it
is even more obvious that the VAX architects did not do it.
Once compilers made significant growth in optimization, and sufficient >silicon area became available.
RISCs are already faster without additional compiler optimization.
Good register allocation is necessary to avoid a large code size--- Synchronet 3.22a-Linux NewsLink 1.2
penalty, however, and that was an issue when the VAX started.
- anton
John Levine <johnl@taugh.com> schrieb:
It appears that Anton Ertl <anton@mips.complang.tuwien.ac.at> said:
However, graph coloring register allocation is not necessary for a
RISC to outperform the VAX 11/780, pipelining is enough. The Berkeley >>RISC people were a hardware group and did not do optimizing compilers.
They sure didn't. They invented register windows because PCC's
register allocator saved and restored lots of registers around
every call, and the windows made that faster. On the 801, they
just saved what they needed to so they didn't even have load or
store multiple.
They had subroutines for register save and restore, which of course
helps code density, but is a bit... iffy.
All part of the original plan, didnrCOt you know? NT was designed at the beginning to be a portable OS, able to run on a range of architecturesYeah, multiarchitecture NT was a neat idea, but they whiffed on some essentials, the time wasn't really right, and they never gave it quite
-- development actually started, not on x86, but on MIPS. It even had
a rCLpersonalityrCY system, where the Win32 API was just one rCLpersonalityrCY
that could be exposed to userland; there were plans to support others.
In the end, the portability of a proprietary OS proved too expensive
to maintain. A few non-x86 ports did ship for a while, but none lasted
for long.
All part of the original plan, didnrCOt you know? NT was designed at the beginning to be a portable OS, able to run on a range of architectures
-- development actually started, not on x86, but on MIPS.
All part of the original plan, didnrCOt you know? NT was designed at the
beginning to be a portable OS, able to run on a range of architectures
-- development actually started, not on x86, but on MIPS.
Wasn't it i860?
Lawrence DrCOOliveiro <ldo@nz.invalid> writes:
All part of the original plan, didnrCOt you know? NT was designed at the
beginning to be a portable OS, able to run on a range of architectures
-- development actually started, not on x86, but on MIPS.
Wasn't it i860?
In article <m2mrrzxdmf.fsf@Mac.lan>, Roman Belenov <no@spam.please>
wrote:
Lawrence D|ore4raoOliveiro <ldo@nz.invalid> writes:
All part of the original plan, didn|ore4raot you know? NT was designed
at the beginning to be a portable OS, able to run on a range of
architectures -- development actually started, not on x86, but on
MIPS.
Wasn't it i860?
Yes. i860 was the first architecture to boot NT.
- Dan C.
RISCs are already faster without additional compiler optimization.
If 1983 compilers were still at the -O1 level, RISC may have failed.
Luckily they were at -O2 at that time, and did.
On Tue, 27 Oct 2026 18:05:10 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <m2mrrzxdmf.fsf@Mac.lan>, Roman Belenov <no@spam.please>
wrote:
Lawrence D|ore4raoOliveiro <ldo@nz.invalid> writes:
All part of the original plan, didn|ore4raot you know? NT was designed
at the beginning to be a portable OS, able to run on a range of
architectures -- development actually started, not on x86, but on
MIPS.
Wasn't it i860?
Yes. i860 was the first architecture to boot NT.
- Dan C.
Wikipedia claims that the first architecture to boot NT was i860
emulator. They don't say what was the hardware host of the emulator.
The first boot on bare metal most likely happened on MIPS R3000.
In article <20261027201539.00001cb0@yahoo.com>,
Michael S <already5chosen@yahoo.com> wrote:
On Tue, 27 Oct 2026 18:05:10 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <m2mrrzxdmf.fsf@Mac.lan>, Roman Belenov
<no@spam.please> wrote:
Lawrence D|a-o|orCU-4|orCR-oOliveiro <ldo@nz.invalid> writes:
All part of the original plan, didn|a-o|orCU-4|orCR-ot you know? NT was >> >> designed at the beginning to be a portable OS, able to run on a
range of architectures -- development actually started, not on
x86, but on MIPS.
Wasn't it i860?
Yes. i860 was the first architecture to boot NT.
- Dan C.
Wikipedia claims that the first architecture to boot NT was i860
emulator. They don't say what was the hardware host of the emulator.
The first boot on bare metal most likely happened on MIPS R3000.
Believe what you want, but I have this first-hand from an
engineer who was there.
- Dan C.
On Mon, 26 Oct 2026 22:16:43 -0000 (UTC)
Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
All part of the original plan, didnrCOt you know? NT was designed at the
beginning to be a portable OS, able to run on a range of architectures
-- development actually started, not on x86, but on MIPS. It even had
a rCLpersonalityrCY system, where the Win32 API was just one rCLpersonalityrCY
that could be exposed to userland; there were plans to support others.
In the end, the portability of a proprietary OS proved too expensive
to maintain. A few non-x86 ports did ship for a while, but none lasted
for long.
Yeah, multiarchitecture NT was a neat idea, but they whiffed on some essentials, the time wasn't really right, and they never gave it quite
the effort it needed, or the marketing push. The core work of getting
it up and running on the various RISC platforms was handled well; 2k
RC1 runs as stably on Alpha as it does on a comparable P2 rig...
...but AFAIK Alpha was the only architecture they developed an x86 translation layer for ('til ARM64, decades later.) So on e.g. PPC or
MIPS you were limited to the set of applications whose developers felt
like providing a native build, which wasn't helped by the fact that M$
sold separate RISC editions of Visual Studio. (I still have the copy of
VB5 from the brief period where $EMPLOYER toyed with Alpha support.)
Moreover, they didn't provide anything like the "fat binary" formats
used by e.g. Apple or NeXT, so even shipping native builds for multiple architectures was a non-trivial thing; nor was there a shared virtual- machine platform developers could target UCSD-style, even though MS had experience with that since the first versions of Visual Basic.
(Granted, performance on VM platforms was even more lackluster in those
days, before the advent of JIT techniques etc., but a slower version of
an application is, in most cases, better than none at all.)
It's also a good question how much demand there was for cross-platform
RISC support at the time - how many Windows users *really* needed to be
on the bleeding edge of performance that bad? - but MS's attitude that
their job was done when the OS was up and running sure didn't help.
On Tue, 27 Oct 2026 18:50:58 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <20261027201539.00001cb0@yahoo.com>,
Michael S <already5chosen@yahoo.com> wrote:
On Tue, 27 Oct 2026 18:05:10 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <m2mrrzxdmf.fsf@Mac.lan>, Roman Belenov
<no@spam.please> wrote:
Lawrence D|a-o|orCU-4|orCR-oOliveiro <ldo@nz.invalid> writes:
All part of the original plan, didn|a-o|orCU-4|orCR-ot you know? NT was >>>>>> designed at the beginning to be a portable OS, able to run on a
range of architectures -- development actually started, not on
x86, but on MIPS.
Wasn't it i860?
Yes. i860 was the first architecture to boot NT.
- Dan C.
Wikipedia claims that the first architecture to boot NT was i860
emulator. They don't say what was the hardware host of the emulator.
The first boot on bare metal most likely happened on MIPS R3000.
Believe what you want, but I have this first-hand from an
engineer who was there.
- Dan C.
Looked further and found this: https://x.com/davepl1968/status/2103977673425047588
Sounds like Wikipedia story is not complete.
The complete story was:
1. First boot - i860 emulator running on i386 under OS/2
2. First boot on bare metal - i860 XR. Unsatisfactory performance.
3. Boot on MIPS 3 months thereafter.
On 10/27/26 12:16, Michael S wrote:
On Tue, 27 Oct 2026 18:50:58 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <20261027201539.00001cb0@yahoo.com>,
Michael S <already5chosen@yahoo.com> wrote:
On Tue, 27 Oct 2026 18:05:10 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:
In article <m2mrrzxdmf.fsf@Mac.lan>, Roman Belenov
<no@spam.please> wrote:
Lawrence D|a-o|orCU-4|orCR-oOliveiro <ldo@nz.invalid> writes:
All part of the original plan, didn|a-o|orCU-4|orCR-ot you know? NT was
designed at the beginning to be a portable OS, able to run on a
range of architectures -- development actually started, not on
x86, but on MIPS.
Wasn't it i860?
Yes. i860 was the first architecture to boot NT.
- Dan C.
Wikipedia claims that the first architecture to boot NT was i860
emulator. They don't say what was the hardware host of the
emulator. The first boot on bare metal most likely happened on
MIPS R3000.
Believe what you want, but I have this first-hand from an
engineer who was there.
- Dan C.
How would I possibly know? My guess is, something like "100 contextLooked further and found this: https://x.com/davepl1968/status/2103977673425047588
Sounds like Wikipedia story is not complete.
The complete story was:
1. First boot - i860 emulator running on i386 under OS/2
2. First boot on bare metal - i860 XR. Unsatisfactory performance.
3. Boot on MIPS 3 months thereafter.
What would "satisfactory" performance for Windows have looked like?
Wasn't there an NT release for the PowerPC?
Thomas Koenig <tkoenig@netcologne.de> posted:
John Levine <johnl@taugh.com> schrieb:
It appears that Anton Ertl <anton@mips.complang.tuwien.ac.at> said:
However, graph coloring register allocation is not necessary for a
RISC to outperform the VAX 11/780, pipelining is enough. The Berkeley
RISC people were a hardware group and did not do optimizing compilers.
They sure didn't. They invented register windows because PCC's
register allocator saved and restored lots of registers around
every call, and the windows made that faster. On the 801, they
just saved what they needed to so they didn't even have load or
store multiple.
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 compiler is at least as good at it as an exception-called
save/restore machine. {Both V8 and V9}
MitchAlsup <user5857@newsgrouper.org.invalid> writes: >anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:
RISCs are already faster without additional compiler optimization.
If 1983 compilers were still at the -O1 level, RISC may have failed. >Luckily they were at -O2 at that time, and did.
The -O1 and -O2 of what compiler do you have in mind?
Gcc was released in 1987; it did have a -O option (IIRC no -O2 yet),--- Synchronet 3.22a-Linux NewsLink 1.2
and gcc beat HP's C compiler on HP/UX (probably PCC-based, i.e., far
less optimization that gcc -O) by a wide margin; yet HP with their not
so great compiler saw good speedups with their C compiler from their
HPPA RISC architecture (introduced 1986) compared to their 68K-based
and HP FOCUS based systems. And that's against the 68030 (when I was
at HP in 1988), which already had a better CPI than the CPI=10 of the
VAX 11/780.
The VAX 11/780 CPI is so abysmally high that even if a VAX instruction
would expand into
load
load
operate
store
on a RISC, the RISC would still beat it easily (on early RISCs this
sequence takes 5 cycles, while a typical VAX instruction takes 10
cycles). You may want to argue cache for the load and the store, but
1) wrt compilers, those memory accesses that compilers can
register-allocate away are cache hits.
2) wrt VAX 11/780, it will miss the cache for the same memory accesses
as the RISC, so cache misses won't help the VAX.
Compilers with better register allocation certainly helped, but they
also helped the CISCs (maybe not as much, but still).
- anton
MitchAlsup <user5857@newsgrouper.org.invalid> writes:
anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:
RISCs are already faster without additional compiler optimization.
If 1983 compilers were still at the -O1 level, RISC may have failed.
Luckily they were at -O2 at that time, and did.
The -O1 and -O2 of what compiler do you have in mind?
Green Hills circa 1985.
Lawrence DrCOOliveiro <ldo@nz.invalid> writes:
All part of the original plan, didnrCOt you know? NT was designed at
the beginning to be a portable OS, able to run on a range of
architectures -- development actually started, not on x86, but on
MIPS.
Wasn't it i860?
In article <11bogu0$10307$1@dont-email.me>, chris.m.thomasson.1@gmail.com (Chris M. Thomasson) wrote:
It was interesting to me that Windows can run on an Alpha:
https://betawiki.net/wiki/Draft:Installing_Windows_NT_on_DEC_Alpha
It worked fine. My employers supported it for several years. It had
customers because it was the fastest Windows platform, for a while.
Of the four OSes I can think of that were ported to Alpha, the one
from Microsoft was 32-bit-only, DEC's homegrown one (OpenVMS) was a
32/64-bit hybrid, and the only fully 64-bit ones were DEC UNIX and
Linux.
Thomas Koenig <tkoenig@netcologne.de> posted:[IBM 801]
John Levine <johnl@taugh.com> schrieb:
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 compiler is at least as good at it as an exception-called
save/restore machine. {Both V8 and V9}
MitchAlsup <user5857@newsgrouper.org.invalid> writes:-----------snip----------
Thomas Koenig <tkoenig@netcologne.de> posted:
[IBM 801]John Levine <johnl@taugh.com> schrieb:
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.
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--- Synchronet 3.22a-Linux NewsLink 1.2
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
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);
...
}
It gets worse when::
type foo( a, b ){
...
return bar( a, b );
...
}
Now you have to copy forward foo->bar and copy bar's return back
as foo's return.
My 66000 takes advantage of this by LDing the Ret Addr first, and then >reLDing the rest of the file, so by the time that is done, FETCH already
has instructions for DECODE>
And register windows tend to cost more in OoO implementations: the
register address table (for implementations with a separate renamer)
becomes larger.
Slower RF, makes the pipeline at least 1/2 cycle longer.
MitchAlsup <user5857@newsgrouper.org.invalid> writes: >anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:--------------------
My 66000 takes advantage of this by LDing the Ret Addr first, and then >reLDing the rest of the file, so by the time that is done, FETCH already >has instructions for DECODE>
I get the impression that My 66000 lives in 1994. In a modern
(post-1995, with a few exceptions, most of which have died out in the meantime) processor the front end predicts the return from the processor-internal return stack and often starts fetching from there
before the load-store unit sees the load of the return address. The
return address is then used to validate the branch prediction and
retire the return instruction.
And register windows tend to cost more in OoO implementations: the
register address table (for implementations with a separate renamer)
becomes larger.
Slower RF, makes the pipeline at least 1/2 cycle longer.
Given register file sizes like 416 physical GPRs on the Qualcomm
Oryon, making the pipeline longer seems to be something CPU designers
can handle these days; with 416 physical GPRs, taking 72 (or however
many architectural registers Fujitsu used) rather than 32 for
architected registers is probably not a big thing, but sure, now there
are 40 fewer registers that can be used for renaming. Still the
growth of the RAT is probably a bigger issue.
- anton--- Synchronet 3.22a-Linux NewsLink 1.2
So iffy that essentially nobody does register windows anymore.
On Tue, 27 Oct 2026 16:58:12 GMT, MitchAlsup <user5857@newsgrouper.org.invalid> wrote:
So iffy that essentially nobody does register windows anymore.
Even I think that register windows are too crazy to consider!
I have banks of 128 registers, but the choice is to use them all or
ignore them.
Of course, there's one register-window-like scheme that I could
*remotely consider* using, even though it is also dangerously flawed.
Give the computer an internal high-speed memory that's only 64K in
size... and copy the Texas Instruments 9900 scheme. That's a little
different from a "window", although in a way it's essentially the same
thing. At least here save and restore don't mean copying the window
contents into memory, but instead saving a copy of the pointer.
John Savard--- Synchronet 3.22a-Linux NewsLink 1.2
In a modern
(post-1995, with a few exceptions, most of which have died out in the
meantime) processor the front end predicts the return from the
processor-internal return stack and often starts fetching from there
before the load-store unit sees the load of the return address. The
return address is then used to validate the branch prediction and
retire the return instruction.
You can't predict until you are within <about> 2-fetch cycles of the >instruction you are going to make a prediction about {RET here}.
When RET is 16-odd instructions (all LDDs) from the current INSERT
point, you aren't at the point you can make a prediction (by couple
of cycles).
The thing is that there may be 16 register loads between the point where
the compiler knows a return is going to happen and the RET instruction
itself (in whatever guise). Given that each takes an instruction, then
we get to the point where moving those 16 register loads through DECODE >prevents FETCH/PREDICT from seeing the RET for several cycles.
But the
EXIT instruction itself makes DECODE know that a bunch of register LDs
will happen and a RET will also happen, so it arranged that RA is fetched >first and then used to fetch instructions at RA and feed DECODE while all
the LDs are transpiring.
Yes, it is easy to predict RET and to fetch instructions there. So, let's
say we predict the RET and we also "predict" <in some manner> the sub- >sequent call. So, while we are still LDing registers, we now need to ST
a bunch of registers {new epilogue} onto the same memory currently being >LDed.
The predictive mechanics to determine that the new epilogue is storing
bit patterns that are already in those memory locations is "non trivial"
for RISC-V but trivial for EXIT-CALL-ENTER.
{For most leaf functions;
there is only RET with no preserved register restoration and no EXIT}.
So, the question, here, boils down to: "How many cycles does it take
DECODE to 'process' 16-LDDs in a row". Even a 10-wide machine may only
have 4 LD/MEM FUs, so it would take 4-odd cycles to push LDDs through
DECODE
and at cycle 2 one could be able to predict RET--whereas My
66000 can predict {with 100% confidence} 2-cycles earlier.
MitchAlsup <user5857@newsgrouper.org.invalid> writes: >anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:
In a modern
(post-1995, with a few exceptions, most of which have died out in the
meantime) processor the front end predicts the return from the
processor-internal return stack and often starts fetching from there
before the load-store unit sees the load of the return address. The
return address is then used to validate the branch prediction and
retire the return instruction.
You can't predict until you are within <about> 2-fetch cycles of the >instruction you are going to make a prediction about {RET here}.
Predictors can make predictions about anything. But given that it is
only useful to make predictions that are actually used, they will only predict the next few I-cache lines to be fetched, so yes, predicting a
few fetch lines ahead could be common.
How many? Depends on the latency of the I-cache. Given that it is
typically similar in size to the D-cache, it's latency will also be
similar, i.e., around 4 cycles.
How many cache lines are fetched per cycle? With a 10-wide front end,
you probably do not want to underutilize the rest of the front end if
there is a taken branch or there is a branch to a target less than 10 instructions from the end of the cache line, so better fetch two cache
lines per cycle.
So there might be about 8 cache lines fetched between the prediction
of the line that includes the return instructions and the actual fetch
of the return instruction. The predictor has to predict the target of
the return as the next prediction.
Now if you want to wait for the result of the return-address load, you
have to contend not just with the latency of the I-cache fetch of this
load, but also the decoding, renaming, scheduling, and execution
(D-cache latency) of this load, typically 10-20 cycles total.
So you
would have to fetch this load 10-20 cycles (and thus 10-20 cycles
worth of instructions, i.e. 100-200 instructions on a 10-wide machine)
to have its result ready for using it to fetch the cache line after
the return instruction (but of course that does not consider that in
such a predictorless design, the return instruction also takes its
time to decode etc.).
Anyway, thanks to branch prediction and speculative execution, that's
not necessary.
When RET is 16-odd instructions (all LDDs) from the current INSERT
point, you aren't at the point you can make a prediction (by couple
of cycles).
The thing is that there may be 16 register loads between the point where >the compiler knows a return is going to happen and the RET instruction >itself (in whatever guise). Given that each takes an instruction, then
we get to the point where moving those 16 register loads through DECODE >prevents FETCH/PREDICT from seeing the RET for several cycles.
Concerning the 16 loads, I don't think I have ever seen a compiler
generate that many in front of a return. It would require that the
calling convention has at least 16 callee-saved registers, and that
they are all being used.
But anyway, even assuming there is this bunch of loads, and the
pipeline from the renamer to the scheduler(s) of the load/store units
is narrow and there is no buffering capacity in between, there is no
reason why the predictor would not predict the return. It does not
need to decode the return instruction to predict it, it just needs to
predict that there will be a return, and then use the hardware return
stack to make the prediction.
Of course, with a design that suffers from congestion between the
renamer and the schedulers, the congestion will eventually clog the
front end back to the instruction fetcher, and then even having a
preduction early will not help. If this is a common occurence, the microarchitecture is obviously badly balanced for the workloads it
uses.
BTW, what is the INSERT point?
But the
EXIT instruction itself makes DECODE know that a bunch of register LDs
will happen and a RET will also happen, so it arranged that RA is fetched >first and then used to fetch instructions at RA and feed DECODE while all >the LDs are transpiring.
Ok, so you are assuming that the congestion has not clogged the
decoder. In that case, a design with a predictor will happily fetch
the target of the return and feed it into the decoders.
Yes, it is easy to predict RET and to fetch instructions there. So, let's >say we predict the RET and we also "predict" <in some manner> the sub- >sequent call. So, while we are still LDing registers, we now need to ST
a bunch of registers {new epilogue} onto the same memory currently being >LDed.
I assume you mean "{new prologue}". -- YES YES
And you assume that the next call also makes use of many callee-saved registers.
The predictive mechanics to determine that the new epilogue is storing
bit patterns that are already in those memory locations is "non trivial" >for RISC-V but trivial for EXIT-CALL-ENTER.
Are the same registers saved to the same places? If that is a common occurence (I don't think so), recognizing and optimizing it in
hardware (probably in the renamer) looks doable.
{For most leaf functions;
there is only RET with no preserved register restoration and no EXIT}.
If you need so many registers that you also use callee-saved
registers, the callee also saves them when the callee is a leaf
function.
Of course, for values that do not live across a call--- Synchronet 3.22a-Linux NewsLink 1.2
(i.e. all values in a leaf function), caller-saved registers are the
first pick.
So, the question, here, boils down to: "How many cycles does it take
DECODE to 'process' 16-LDDs in a row". Even a 10-wide machine may only
have 4 LD/MEM FUs, so it would take 4-odd cycles to push LDDs through >DECODE
I would not know why a 10-wide decoder would not decode 10 loads per
cycle. Likewise for the renamer. Then the schedulers may be more
limited, but if so, and having loads and stores in large bunches is
common, a competent designer will insert some buffering capacity to
avoid congesting the front end.
and at cycle 2 one could be able to predict RET--whereas My
66000 can predict {with 100% confidence} 2-cycles earlier.
You mean, it can resolve the prediction two cycles earlier. Given
that return stack prediction is very accurate, the benefit might be
that one can use a smaller ROB, if the prediction of return was the
only reason for having a large ROB. But I think that other reasons
for having a large ROB (such as conditional branches, or cache misses)
stull persist and are actually more important.
- anton
MitchAlsup <user5857@newsgrouper.org.invalid> writes:
anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:
In a modern
(post-1995, with a few exceptions, most of which have died out in the
meantime) processor the front end predicts the return from the
processor-internal return stack and often starts fetching from there
before the load-store unit sees the load of the return address. The
return address is then used to validate the branch prediction and
retire the return instruction.
You can't predict until you are within <about> 2-fetch cycles of the
instruction you are going to make a prediction about {RET here}.
Predictors can make predictions about anything. But given that it is
only useful to make predictions that are actually used, they will only
predict the next few I-cache lines to be fetched, so yes, predicting a
few fetch lines ahead could be common.
How many? Depends on the latency of the I-cache. Given that it is
typically similar in size to the D-cache, it's latency will also be
similar, i.e., around 4 cycles.
How many cache lines are fetched per cycle? With a 10-wide front end,
you probably do not want to underutilize the rest of the front end if
there is a taken branch or there is a branch to a target less than 10
instructions from the end of the cache line, so better fetch two cache
lines per cycle.
A cache line contains 16 instructions, so one would assume a partial
line is held over (to the next decode cycle) and one makes 1 fetch
in the sequential direction and 1 fetch to another predicted address.
I have numerous examples of RISC-V (LLVM -O3) having 13 STs in prologue
and 13 LDs in epilogue. The distribution (excepting for leaf functions
(0 saved) and director functions (1 saved) is basically a Bell Curve
from 2->13.)
It does not
need to decode the return instruction to predict it, it just needs to
predict that there will be a return, and then use the hardware return
stack to make the prediction.
Maybe predictors have gotten that good.
5 cycles on a modern CPU, possibly more like 10 cycles. With onetaken branch every 10 instructions or so, this would limit your IPC to
No, of course not. Leaf functions (93%) save no registers at all as they >perform their duties in the freely-available temporary registers R0..15
MitchAlsup <user5857@newsgrouper.org.invalid> writes: >anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:
MitchAlsup <user5857@newsgrouper.org.invalid> writes:
anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:
In a modern
(post-1995, with a few exceptions, most of which have died out in the >> >> meantime) processor the front end predicts the return from the
processor-internal return stack and often starts fetching from there
before the load-store unit sees the load of the return address. The
return address is then used to validate the branch prediction and
retire the return instruction.
You can't predict until you are within <about> 2-fetch cycles of the
instruction you are going to make a prediction about {RET here}.
Predictors can make predictions about anything. But given that it is
only useful to make predictions that are actually used, they will only
predict the next few I-cache lines to be fetched, so yes, predicting a
few fetch lines ahead could be common.
How many? Depends on the latency of the I-cache. Given that it is
typically similar in size to the D-cache, it's latency will also be
similar, i.e., around 4 cycles.
How many cache lines are fetched per cycle? With a 10-wide front end,
you probably do not want to underutilize the rest of the front end if
there is a taken branch or there is a branch to a target less than 10
instructions from the end of the cache line, so better fetch two cache
lines per cycle.
A cache line contains 16 instructions, so one would assume a partial
line is held over (to the next decode cycle) and one makes 1 fetch
in the sequential direction and 1 fetch to another predicted address.
With this design the rest of the front end would not be fully utilized
if there are is more than on taken branch per n instructions (where n
is the decode width). With 10-wide designs, that's restrictive.
I have programs here that have more than 1 taken branch on 10
instructions:
perf stat -e instructions:u -e br_inst_retired.near_taken:u ./magichex 3 2 ...
143280237 instructions:u
16156505 br_inst_retired.near_taken:u
That's 8.9 instructions per taken branch.
perf stat -e instructions:u -e br_inst_retired.near_taken:u gforth-fast --no-dynamic onebench.fs
4249141031 instructions:u
661631554 br_inst_retired.near_taken:u
That's 6.4 instructions per taken branch.
Although, admittedly, in the last case if we take the "--no-dynamic"
away, this reduces the number of taken branches more than the number
of instructions, resulting in more than 10 instructions per taken
branch:
2026987196 instructions:u
175323098 br_inst_retired.near_taken:u
But it uses dynamic native-code generation, which you have poo-pooed
as "self-modifying code",
so presumably My 66000 will have to fall
back to --no-dynamic and will have to take at least 661M cycles for
this benchmark if it can only deal with one taken branch per cycle,
whereas even a lowly Darkmont (Core Ultra 225 E-Core) can run this
benchmark on 440M cycles.
I have numerous examples of RISC-V (LLVM -O3) having 13 STs in prologue
and 13 LDs in epilogue. The distribution (excepting for leaf functions
(0 saved) and director functions (1 saved) is basically a Bell Curve
from 2->13.)
It's interesting that you have numerous examples of needing 13
callee-saved registers for non-leaf functions, but apparently the 16 caller-saved registers are enough for the leaf functions; i.e., there
is not a single leaf function that needs more than 16 registers (the
number of caller-saved registers in the RISC-V ABI).
It does not
need to decode the return instruction to predict it, it just needs to
predict that there will be a return, and then use the hardware return
stack to make the prediction.
Maybe predictors have gotten that good.
They have to. You cannot afford to wait to decode a branch before
starting to predict it when you need to be able to deal with 1-2 taken branches per cycle.
If you wait for the fetch and the decode before
starting to predict, you will see at most 1 taken branch every n
cycles, where n=fetch_latency+decode_latency+predictor_latency, i.e.,
5 cycles on a modern CPU, possibly more like 10 cycles. With onetaken branch every 10 instructions or so, this would limit your IPC to
1-2, and much of the 10-wide design would starve.
No, of course not. Leaf functions (93%) save no registers at all as they >perform their duties in the freely-available temporary registers R0..15
If a leaf function needs more GPRs, it use callee-saved registers, and
will save them in the prologue and load them in the epilogue.
- anton--- Synchronet 3.22a-Linux NewsLink 1.2
...if we take the "--no-dynamic" away
But it uses dynamic native-code generation, which you have poo-pooed
as "self-modifying code",
I have indeed.
If --no-dynamic has to do with dynamically loaded libraries, ABI
allows for them via GOT (without PLT saving a branch in the process).
There are leaf functions which need more than 16 registers--where did I
imply otherwise--there are "just not many".
Leaf functions (93%) save no registers at all as they
perform their duties in the freely-available temporary registers R0..15
Remember
that 10-wide machine is only retiring 3 I/c.
MitchAlsup <user5857@newsgrouper.org.invalid> writes: >anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:
...if we take the "--no-dynamic" away
But it uses dynamic native-code generation, which you have poo-pooed
as "self-modifying code",
I have indeed.
If --no-dynamic has to do with dynamically loaded libraries, ABI
allows for them via GOT (without PLT saving a branch in the process).
No, --no-dynamic falls back to using a threaded-code interpreter,
while --dynamic (default) uses native code generated at run-time (what
you call "self-modifying code" and want to disable; other people call
it "JIT compilation").
There are leaf functions which need more than 16 registers--where did I >imply otherwise--there are "just not many".
Here:
Leaf functions (93%) save no registers at all as they
perform their duties in the freely-available temporary registers R0..15
Remember
that 10-wide machine is only retiring 3 I/c.
I regularly see programs with >3IPC on 5-wide, 6-wide and 8-wide
machines. E.g., for "gforth-fast onebench.fs" mentioned above on a
Darkmont (Core Ultra 225 E-Core).
424_922_809 cpu_atom/cycles:u/
2_044_802_828 cpu_atom/instructions:u/ # 4.81 insn per cycle
A few weeks ago <2026Sep21.171615@mips.complang.tuwien.ac.at> I
reported measuring 6.75 IPC on a Rocket Lake, which is usually
considered to be 5-wide, and with reason (only 5 renamer slots etc.).
Here we see 7 IPC in a loop because the loop contains two cmp+branch combinations, which consume only one slot in the path from the
microcode cache through the renamer to the schedulers. Both branches
are taken in the measured loop, i.e., 1 taken branch every 3.5
instructions.
- anton--- Synchronet 3.22a-Linux NewsLink 1.2
MitchAlsup <user5857@newsgrouper.org.invalid> writes:
anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:
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);
...
}
It gets worse when::
type foo( a, b ){
...
return bar( a, b );
...
}
Now you have to copy forward foo->bar and copy bar's return back
as foo's return.
No, it's a tail-call. You just jump to bar without saving or
restoring a register window.
My 66000 takes advantage of this by LDing the Ret Addr first, and then >>reLDing the rest of the file, so by the time that is done, FETCH already >>has instructions for DECODE>
I get the impression that My 66000 lives in 1994. In a modern
(post-1995, with a few exceptions, most of which have died out in the meantime) processor the front end predicts the return from the processor-internal return stack and often starts fetching from there
before the load-store unit sees the load of the return address. The
return address is then used to validate the branch prediction and
retire the return instruction.
Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
In a modern
(post-1995, with a few exceptions, most of which have died out in the
meantime) processor the front end predicts the return from the
processor-internal return stack and often starts fetching from there
before the load-store unit sees the load of the return address. The
return address is then used to validate the branch prediction and
retire the return instruction.
It must be more complex. Silly fibonacci benchmark shows average
performance of function call per 2 clocks.
Given length of
the pipeline return address is pushed too late to use it for
fetching intructions after return. In other words, return
must be predicted before the call starts executing.
antispam@fricas.org (Waldek Hebisch) writes:
Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
In a modern
(post-1995, with a few exceptions, most of which have died out in the
meantime) processor the front end predicts the return from the
processor-internal return stack and often starts fetching from there
before the load-store unit sees the load of the return address. The
return address is then used to validate the branch prediction and
retire the return instruction.
It must be more complex. Silly fibonacci benchmark shows average >>performance of function call per 2 clocks.
Without inlining? On what hardware?
What I see on a Rocket Lake with a Fibonacci program compiled by the
Rust 1.89 compiler is 3.6 cycles per return (i.e., also per call, with
2.3 branches per return). I have not looked at the code to see if
there is any inlining, but given that a regular fibonacci call
includes a call, a conditional branch, and a return (with any
recursive call accounted separately), showing 2.3 branches indicates
that there is at least some inlining going on here.
for($j = 2; $j < 50; $j++) {
my($k) = $j - 1;
my($l) = $j - 2;
print << "EOD2";
.globl fib$j
.type fib$j, \@function
fib$j:
call fib$k
call fib$l
The other is generated by the perl program below.
Generated code contains only calls and returns
-----------<cut here>---------------
print << 'EOD1';
.file "fib3c.pl"
EOD1
my($j);
for($j = 2; $j < 50; $j++) {
my($k) = $j - 1;
my($l) = $j - 2;
print << "EOD2";
.globl fib$j
.type fib$j, \@function
fib$j:
call fib$k
call fib$l
ret
.size fib$j, .-fib$j
EOD2
}
-----------<cut here>---------------
On Sun, 8 Nov 2026 04:37:34 -0000 (UTC), Waldek Hebisch wrote:
for($j = 2; $j < 50; $j++) {
my($k) = $j - 1;
my($l) = $j - 2;
print << "EOD2";
.globl fib$j
.type fib$j, \@function
fib$j:
call fib$k
call fib$l
ShouldnrCOt there be a rCLfib0rCY somewhere?
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 76 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 54:49:20 |
| Calls: | 1,265 |
| Calls today: | 1 |
| Files: | 1,362 |
| D/L today: |
3 files (2,684K bytes) |
| Messages: | 285,582 |