This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: MIPS16 -mentry pseudo instruction definitions


--- Jim Wilson <wilson@cygnus.com> wrote:
> > Aside from this possible bug, there are no
comments
> > which give a clue as to why the stack frame size
is
> > fixed at 32bytes, which is the question which
really
> > bothers me.
> 
> Probably it was just chosen as a convenient number.
entry has to
> allocate some amount of stack space, and there is no
opcode space to
> encode the amount, so someone picked a number that
seemed right.  Big
> enough to satisfy most frames, but not too big that
it would waste too > much stack space.

I don't think this is true.
If you assume compatability with the o32 abi, then 4
words of stack are needed for any callee to save its
parameters, but any other requirement (ie for ra, s0
and s1) is encoded within BOTH the entry/exit
instructions and therefore could be allocated (and
de-allocated again on the way back out) as required
within the trap handler.

For most embedded systems (certainly in my case), the
advantage of an (order of) 5 percent gain in code
density when using the -mentry option over standard
mips16 code is more than outweighed by the
disadvantage of increased RAM requirements. (Maybe
this problem explains why no obvious interest seems to
have been taken in this option thoughout the
development of egcs).

Anyway, thats enough complaining.
Is there anyone out there with enough knowledge of the
workings of mips.c who could take a look at this (or
even just give some pointers so a gcc newbie like me
could have a go) ?
I'm willing to do some testing and to write and test a
new entry.S trap handler.


> The gcc code supporting -mentry was originally
written by Ian
> Taylor, but he isn't at Cygnus anymore either,
though he is reachable
> by mail.

Could you forward this post to him please ? Maybe he
can shed some light on why the original choice was
made.



____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]