public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Mike Laman" <mlaman@cox.net>
To: "GCC" <gcc@gcc.gnu.org>
Subject: Re: __main
Date: Mon, 02 Sep 2002 03:36:00 -0000	[thread overview]
Message-ID: <002f01c2526c$caec13d0$5aa80844@fed1.sdca.home.com> (raw)
In-Reply-To: <20020902055611.GA2016@mars.cs.mu.oz.au>

Hi,

We're talk about 6 bytes for the call and 2 bytes to immediately
bounce back. 8 bytes certainly aren't much, but I'm working with
only a few Kilobytes(!) of space, so please excuse my "enthusiasm"
for every byte I can save. (Being able to use the optimizing abilities
of GCC was one big reason to use GCC, among may other pluses!)

This machine will not be run C++. Just C, so I won't need "__main".

As for the assembler, there's a big attempt to allow us to output
code for other assemblers, but it has some assumptions that are invalid.
Like tabs. Invalid characters (underscores starting a symbol).

I hate the idea of writing a silly little program to mangle the compiler
output to make it valid assembly (tabs, underscores,
what-ever-else-comes-up-I-continue-to-battle, ...),
so I can then assemble it. And I sure don't want to hack GCC
for my own version, then I'll be perpetually hacking it,
and that's a lot of overhead. And I understand others may not
want to make any of these changes (They're "only my problem").
It's just that having to write an assembly massager seems to go
against the goal of the cross compiling abilities, but reality isn't
elegant.

GCC is a cross compiler, so I would hope that part of the goal of
making this a cross compiler is that I don't need to post process the GCC
assembly output before I can assemble it.

Maybe I'm missing the point, but I think these issues are with the
compiler - not the assembler. The assembler is already defined -
such can be the life with cross compiling.

Please don't misunderstand me. I certainly appreciate the help. One way or
another
I'll make things happen. I'm just raising issues I've come up with. They're
probably going to be only my problems, though I do get concerned as the
number of issues start add up. I do see others talking about ports to other
processors
giving me the impression they may have the some of the same issues that I
have,
so I raise the issues here.

Thanks again,
Mike

----- Original Message -----
From: "Fergus Henderson" <fjh@cs.mu.oz.au>
To: "Mike Laman" <mlaman@cox.net>
Cc: "GCC" <gcc@gcc.gnu.org>
Sent: Sunday, September 01, 2002 10:56 PM
Subject: Re: __main


> On 01-Sep-2002, Mike Laman <mlaman@cox.net> wrote:
> > I've got to think that others porting GCC to small chips will have the
> > same issue. For me space is very important. Unfortunately, the bytes
count.
>
> How many bytes are we talking about?
> On x86 it's only half a dozen bytes, per program.
> I'm sorry, but I just can get very excited about that.
>
> > Also the standard assembler for this chip does not accept an "_" for
> > the first character. Don't look at me - I didn't write it, but I do need
to
> > interface with it.
>
> Not a GCC problem.
> If that's the real issue, then you are mailing the wrong list.
>
> --
> Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the
pursuit
> The University of Melbourne         |  of excellence is a lethal habit"
> WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
>

  reply	other threads:[~2002-09-02 10:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-29 11:25 __main Robert Spanton
2002-08-29 11:40 ` __main Fergus Henderson
2002-08-29 22:18   ` __main Mike Laman
2002-09-01  9:04     ` __main Fergus Henderson
2002-09-01 13:14       ` __main Mike Laman
2002-09-01 13:22         ` __main Mike Laman
2002-09-01 13:40           ` __main Robert Spanton
2002-09-02  4:26             ` __main Lars Brinkhoff
2002-09-02  5:29           ` __main Ian Dall
2002-09-02 19:08             ` __main Mike Laman
2002-09-01 22:56         ` __main Fergus Henderson
2002-09-02  3:36           ` Mike Laman [this message]
2002-09-02  5:51             ` __main Fergus Henderson
2002-09-02 19:06               ` __main Mike Laman
2002-09-03 14:03                 ` __main Fergus Henderson
2002-09-03 14:21                   ` __main Neil Booth
2002-09-04  4:03                     ` __main Richard Earnshaw
2002-09-02 19:37     ` __main Zack Weinberg

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='002f01c2526c$caec13d0$5aa80844@fed1.sdca.home.com' \
    --to=mlaman@cox.net \
    --cc=gcc@gcc.gnu.org \
    /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).