View Single Post
Old 03 April 2015, 15:12   #26
Registered User

Megol's Avatar
Join Date: May 2014
Location: inside the emulator
Posts: 209
Originally Posted by matthey View Post
I told Gunnar something like "a prefix would be the most orthogonal way to add more registers but you don't like that" when he was asking me to "participate" in finding encodings for the new registers. I didn't get an answer which is common when Gunnar doesn't want to answer. The StarCore DSP has many similarities to the 68k and has a prefix with more registers as well as flags much as we had discussed (although StarCore is not a good ISA for other reasons IMO). Gunnar's registers would be better for code density but compilers are going to have a very difficult time effectively using and implementing support for non-orthogonal registers.
My impression is that he assumes assembly coding.

A few more address registers (even one) would be useful. Too bad the 68k didn't have A0-A7 perfectly orthogonal with a separate SP but the way it is now is good for code density (as many trade-offs are on the 68k). A5 for the stack frame link register can be turned off and the stack used (it works in vbcc and SAS/C but GCC has always had problems with this). A4 is what I believe he wants to move to A8/BR as it is often used with simple addressing modes. I think it might be a little easier to use by compilers with a patch but I don't like calling it A8 which infers orthogonality with A0-A7. Actually, A6 might have been the register to move to a LB (Library Base) register which also almost always uses (d16,A6). GCC needs a patch to swap A6 (normally the link register on a 68k) with A5 on the Amiga and some versions have become confused. IMO, there isn't a compelling enough reason to add registers considering compatibility and changes which would be needed to support it (not to mention the encodings are overly creative). More integer registers would probably help performance some but lack of them is not a major bottleneck on the 68k.
If one wants/needs more address registers then one should do that. But adding one extra register using dirty hacks, making it not only non-orthogonal but also limited in other ways? I maintain that it is an abomination. It requires a lot of work to function while only providing one extra register.

Using a prefix one would not only get 8 extra integer registers but also 8 extra address registers. Or even 24 extra registers of each (though that would severely limit other extensions).
Megol is offline  
Page generated in 0.05301 seconds with 9 queries