Liste des Groupes | Revenir à c arch |
mitchalsup@aol.com (MitchAlsup1) writes:Instead, you built the increment loop around the IP itself. Basically,On Wed, 11 Jun 2025 22:00:33 +0000, EricP wrote:>
>MitchAlsup1 wrote:On Wed, 11 Jun 2025 16:51:29 +0000, Anton Ertl wrote:
>Program Counter: Some instruction sets (ARM A32, IIRC PDP-11 and VAX)>
have the PC addressed like a GPR, although it clearly is a
special-purpose register. Most RISCs don't have this, and don't even
have a PC-relative addressing mode or somesuch. Instead, they use
ABIs where global pointers play a big role.
I consider IP as a GPR a mistake--I think the PDP-11 and VAX
people figured this out as Alpha did not repeat this mistake.
Maybe in a 16-bit machine it makes some sense but once you have
8-wide fetch-decode-execute it no longer does.
Actually, it seems to me that for the first RISC generation, it made
the least sense. You could not afford the transistors to do special
handling of the PC.
Nowadays, you can afford it, but the question still is whether it isConsider that in a 8-wide machine, IP gets added to 8 times per cycle,
cost-effective. Looking at recent architectures, none has PC
addressable like a GPR, so no, it does not look to be cost-effective
to have the PC addressable like a GPR. AMD64 and ARM A64 have
PC-relative addressing modes, while RISC-V does not.
I disagree, the way VLE is implemented in My 66000 allows instruction>On the con side, for all PC-relative addressing the offset is>
relative to the incremented PC after *each* operand specifier.
So two PC-rel references to the same location within a single
instruction will have different offsets.
This is exactly what made wide VAXs so hard to pipeline.
I don't think that would cause a real problem for decoder designers
these days. It might cost some additional transistors, though.
ThisMy 66000 also has this property, but also the property that any IP
design choice in VAX was very likely due to the implementation choices
(sequential decoding of instruction parts) they had in mind, and these
days one would probably make a different choice even if one decided to
design an otherwise VAX-style instruction set. How did the NS32k
designers choose in this respect?
>
That being said, how does the design choice to include PC-relative
addressing in AMD64 and ARM A64 come out in the long run? When AMD64
and ARM A64 was designed, the data was still delivered in the
microinstruction in most microarchitectures, and in that context,
PC-relative addressing does not cost extra; you just fill in the data
from the start.
But Intel switched to having separate rename registers in Sandy BridgeK9 was going to unify x86+64, x87, MMX-SBVE into a single register file,
(around the time when ARM A64) appeared, and others did the same, so
now there is no space in the microinstructions for including the value
of the PC when the instruction was decoded.
I guess that this value
is stored in a physical register on decoding, and each use of
PC-relative addressing reduces the amount of available physical
registers from the time when the register renamer processes the
instruction until the time when the instruction is processed by the
ROB; can someone confirm this, or is it done in some other way?
>
- anton
Les messages affichés proviennent d'usenet.