|Usage of G registers in SPARC firstname.lastname@example.org (1993-09-02)|
|Date:||Thu, 2 Sep 1993 20:53:32 GMT|
I have a question regarding usgae of G registers
by C compiler on SUN SPARC-1.
When I mix C and assembly code I am having a problem
with which registers to save. For this I need to know
how the C compiler uses G registers. In the absence
of any information I am forced to save and restore all
the G registers, which is obviously very slow.
There is no problem with O,L and I registers. But some
of the G registers are corrupted after making call to
library (to printf etc.). Because of this I am
forced to save and restore all the G registers. Is there
a way out?
And what is the intended usage for G registers? Is it for
saving values across function calls? If so, how does the
compiler handle them?
Thanks in advance,
--- email@example.com ---
Return to the
Search the comp.compilers archives again.