3 ms·
Xtensa (c.f. ESP-32 et. al. -- it's actually a pretty popular embedded architecture) also has a register window scheme, simultaneously more and less complicated
by ajross 6y ago
Xtensa (c.f. ESP-32 et. al. -- it's actually a pretty popular embedded architecture) also has a register window scheme, simultaneously more and less complicated than SPARC's.
Likewise the ia64 registers were rotating, with a hardware stack engine.
To answer the main question: this wasn't abandoned in the industry. CPUs still do it. It just doesn't really provide much of a competetive benefit to architectures that do it, so it's largely been abandoned.
- olliej 6y agoWhat do you by rotating in x86? are you referring to the renaming? Where is the xtensa documentation? My random googling seems to indicate it has a more traditional fixed set of registers? On SPARC for instance (super super super pseudo code here, I haven't written sparc assembly for... almost 20 years?) mov %o0, an_argument call a_function ... a_function: ; the argument is now in %i0 or something like that.
- lokedhs 6y agoYou got the arguments backward. SPARC uses the proper order (source,dest) So it would be something like: ld [%l0],%o0 ; Load whatever is pointed to by %l0 into %o0 call some_function ; Stores the old pc in %o7 ; Result is now in %o0 some_function: save ; Move the register window ; The argument is now in %i0 ld %i0,%l0 ; This does not overwrite the caller's l0 ret ; Return, essentially a jump to %i7 restore ; Called due to delay slot, restores the window
- ajross 6y agox86 does not rotate its registers (though the 8087 did). I said "ia64", which is the Itanium architecture. It actually had a mix of fixed, caller-save registers and rotating argument registers, and an outrageously complicated hardware engine for moving them to and from the stack. Xtensa is simpler than Itanium, in that the windows are fixed 4-register sets and the spilling and filling is done in an exception handler. But it's more complicated than SPARC for sure. The details are in the "Xtensa Instruction Set Architecture Reference Manual", which is a PDF that is commonly available on the internet but not AFAIK actually distributed by Cadence itself.
- olliej 6y agoah my bad! Sorry I just brainfarted on arches name! I'm a muppet