Porting GCC troubles : about register window

Hans-Peter Nilsson hp@bitrange.com
Sun Sep 28 21:25:00 GMT 2003


On Sun, 28 Sep 2003, [gb2312] chen haibo wrote:
>    I plan to port GCC for a new processor which has 16
> sets of registers(8 in each set).Since only one
> set is visible at any time so that I can omit the
> register protection if the depth the call is not
> exceed 16.

Sounds like register windows, like sparc.

> But the call depth did exceed 16, then I
> should reserve all the registers to memory or each set
> per time,and in my porting,I must each time to
> judge if the call depth exceeds 16.

I presume the register set pointer is a hidden register, not
accessible from a program.

>I think it is a
> very trouble thing,I wonder if the GCC porting
> mechanics has any interface to deal with it or if any
> one know how to solve the problem.Wait for help,Thanks all!

Nothing other than the obvious: pass the call depth as one of
the function parameters.

brgds, H-P



More information about the Gcc mailing list