Article View: comp.arch
Article #448Re: Register windows (was: Why VAX Was the Ultimate CISC and Not RISC)
From: MitchAlsup
Date: Thu, 29 Oct 2026 20:31
Date: Thu, 29 Oct 2026 20:31
87 lines
5691 bytes
5691 bytes
anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:
> 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.
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}.
There are cases where one has an EXIT-CALL-ENTER where both {EXIT LDDs
and ENTER STs} are elided, since the return from this CALL will perform
those restores--but only to the overlapping set of registers.
In no way am I preventing predictors from predicting {although I am
reducing the number of <hard> cases they have to sift through.} I am
realistic about when a prediction may transpire. Generally current IP
and some HASHing bits are used to access predictor(s) in cycle k,
and are available in cycle k=1 to make a FETCH prediction for cycle
k+2.
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.
It is this "push through DECODE" notion I have been struggling with
for a "while". Once I saw 42-instructions in a row out of the compiler
all targeting the FMAC FU--I knew I needed a way to move instructions
through DECODE faster than the targeted FU can process them. Prologues
and epilogues are just more of this same problem.
I suspect others have found similar "push through DECODE" issues, too.
> >> 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.
The RAT _was_ a big problem for K9 {with 22 ports per cycle}, its only
saving grace was that it was only 8-bits wide {instead of 64+}.
> - anton
Technical Details
Message-ID:
<1793305885-5857@newsgrouper.org>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!newsgrouper.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> <2026Oct29.171118@mips.complang.tuwien.ac.at> <1793296454-5857@newsgrouper.org> <2026Oct29.190945@mips.complang.tuwien.ac.at>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!newsgrouper.org!.POSTED!not-for-mail From: MitchAlsup <user5857@newsgrouper.org.invalid> Newsgroups: comp.arch Subject: Re: Register windows (was: Why VAX Was the Ultimate CISC and Not RISC) 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> <2026Oct29.171118@mips.complang.tuwien.ac.at> <1793296454-5857@newsgrouper.org> <2026Oct29.190945@mips.complang.tuwien.ac.at> Date: Thu, 29 Oct 2026 20:31:25 GMT Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-ID: <1793305885-5857@newsgrouper.org> Injection-Info: newsgrouper.org; mail-complaints-to="newsgrouper@yahoo.com"; posting-account=user5857 Injection-Date: Thu, 29 Oct 2026 20:31:25 GMT User-Agent: Newsgrouper/0.9.0