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]
Other format: [Raw text]

Re: __main


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


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