public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andre McCurdy <armccurdy@yahoo.co.uk>
To: Jim Wilson <wilson@cygnus.com>
Cc: gcc@gcc.gnu.org
Subject: Re: MIPS16 -mentry pseudo instruction definitions
Date: Thu, 30 Sep 1999 18:02:00 -0000	[thread overview]
Message-ID: <19990914141156.848.rocketmail@web601.yahoomail.com> (raw)
Message-ID: <19990930180200.2qFEoS9wDfpJqPDgVCUKPGc6bw2je0CjsSxhGBNTGTc@z> (raw)

--- 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

             reply	other threads:[~1999-09-30 18:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-14  7:07 Andre McCurdy [this message]
1999-09-30 18:02 ` Andre McCurdy
  -- strict thread matches above, loose matches on Subject: below --
1999-09-13  5:53 Andre McCurdy
1999-09-13  8:52 ` Rask Ingemann Lambertsen
1999-09-30 18:02   ` Rask Ingemann Lambertsen
1999-09-13 12:32 ` Jim Wilson
1999-09-30 18:02   ` Jim Wilson
1999-09-30 18:02 ` Andre McCurdy
1999-09-10  8:21 Andre McCurdy
1999-09-10 11:57 ` Jim Wilson
1999-09-30 18:02   ` Jim Wilson
1999-09-30 18:02 ` Andre McCurdy
1999-09-09  7:06 Andre McCurdy
1999-09-09 14:42 ` Richard Henderson
1999-09-30 18:02   ` Richard Henderson
1999-09-30 18:02 ` Andre McCurdy
1999-09-08 11:33 Andre McCurdy
1999-09-08 14:05 ` Jeffrey A Law
1999-09-30 18:02   ` Jeffrey A Law
1999-09-30 18:02 ` Andre McCurdy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19990914141156.848.rocketmail@web601.yahoomail.com \
    --to=armccurdy@yahoo.co.uk \
    --cc=gcc@gcc.gnu.org \
    --cc=wilson@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).