Porting GCC troubles : about register window
chen haibo
chbchb1130@yahoo.com.cn
Tue Sep 30 07:29:00 GMT 2003
--- Hans-Peter Nilsson <hp@bitrange.com> µÃÃýÃãº> 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.
Yes,But sparc only has one uniform set of registers.
>
> > 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.
>
Yes,the register set pointer is part of a special
register,say psw,and I can set it through some special
instructions.
> >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.
>
But I don't think it pratical to force programmer to
write a function with its call depth as a parameter
and when we encounter a recursive function,we can not
even know the exactly what the call depth is.
I have seen that the INCOMING_REGNO,OUTGOING_REGNO and
LOCAL_REGNO macro is used for register window,but I
don't find it rather useful for my situation.
waiting for your help!
thanks!
> brgds, H-P
>
_________________________________________________________
Do You Yahoo!?
ÃôÃõçÃÃÃúÃ
£¬Ãì»áÃÃ
Ȣè[ÃÃÃÃÃä¾³Ãõçð]µÃ¶¯¸Ã÷Ãæ£¬»¹ÃÃÃøÃçÃãÃñ÷+ÃÃ
ȢèÃÃÃô»úµÃÃãôÃÃ
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.messenger.yahoo.com
More information about the Gcc
mailing list