Port-sparc64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: SPARC V9: register windows vs. flat register set



On Mon, 23 Nov 2026 18:52:47 +0300
Valery Ushakov <uwe%stderr.spb.ru@localhost> wrote:

> The V8 manual says at the very end of the section D.8. Other Register
> Window Usage Models (H.1.5 Other Register-Window-Usage Models in the
> V9 manual, but V8 version is more verbose):
> 
>   It would be possible to run user code with one register-usage
>   convention and supervisor code with another.

Yeah I remember reading this as well and thought this was some of kind
of a proof of concept idea. I haven't been able to find any OS that
would actually implement it.

> The firmware for the microSPARC-II Sun-Rays used the flat ABI, but it
> was not really an OS.

That's interesting. I was reading that flat ABI is mostly used for
small embedded systems, however I think other use cases can also benefit
from it. For example, modern software is quite bloated and can
frequently result in deeply nested function calls. My own testing shows
significant reduction in latency with deeply nested functions when
using GCC -mflat compiler option. You can view test results here for
various CPUs:
https://cryintothebluesky.blogspot.com/2026/11/sparc-v9-register-windows.html

As far as I know, GCC is the only compiler that can generate code for
the flat SPARC ABI. I looked at various SunStudio C compiler options,
but I did not manage to find anything similar.


Home | Main Index | Thread Index | Old Index