I am using assembly program mixed with high level language. Can I use a local registers (l0 to l7), for programming? As I have two observations.
- Machine code generated by compiler don't have local registers.
- Register l0 to l3 used by trap model.
Considering the above two points, can I use the local register for assembly programming?
Thanks in advance.
First of all, if you haven't already, have a look at this wheel diagram: https://icps.u-strasbg.fr/people/loechner/public_html/enseignement/SPARC/sparcstack.html It's taken from the SPARC V8 architecture manual and shows how the in, out, and local registers work.
There are two main takeaways from this diagram.
In short, the answer to your question is yes, you can use the local registers for assembly programming.
To address your observations:
Hope this helps. This is mostly from memory and I haven't worked on SPARC within the past year, so I welcome corrections.