Liste des Groupes | Revenir à c arch |
Lawrence D'Oliveiro <ldo@nz.invalid> writes:MIPS would disagree.Like I said, I wondered why this sort of thing wasn't more common ...>
For the early RISCs, the pipeline was designed for early branch
execution. Performing an ALU op before the branch did not fit that
kind of pipeline.
However, having a branch-and-subtract would have been possible. ButMIPS pipeline performed Branch Target Calculation by pasting bits
how would that have interacted with the branch delay slots that many
of them had? I guess one could perform the subtract before the
instruction in the delay slot, and take the branch afterwards (if it
is taken).
So it would actually fit. Why was it not done? Maybe the idea wasOn the Intel side they mostly depend on prediction.
that induction-variable elimination would usually eliminate the
subtract anyway, so why complicate the architecture with such an
instruction?
>
For over a decade, Intel decoders have decoded many sequences of ALU
and branch instructions into one uop, so they can do at a
microarchitectural level what you are asking about at the architecture
level. Other microarchitectures have followed this pattern, and
RISC-V seems to make a philosophy out of this.
ARM A64 OTOH seems to put everything into an instruction that fits inMy 66000 finds use cases all the time, and I also have Branch on bit
32 bits, and while they have instructions (TBNZ and TBZ) that tests a
specific bit in a register and branch if the bit is set or clear, they
have not added a subtract-and-branch or branch-and-subtract
instruction. Apparently the uses for such an instruction are not that
frequent.
- anton
Les messages affichés proviennent d'usenet.