Common labels not outputed where needed
Alexandre Courbot
alexandrecourbot@linuxgames.com
Mon Mar 25 09:56:00 GMT 2002
Hello everybody,
I'd greatly appreciate if anyone experienced with GCC could help me with
this issue related to my port.
Take the following C program:
static char c = 5;
static char i;
void barfunc()
{
c = 5;
i = 2;
c = c + i;
i++;
}
void foofunc()
{
i = 3;
}
Which gives the following output (not definitive syntax):
.FACADE 00
.CardByte c 5
barfunc:
c <- #5
i <- #2
c <- c + i
i <- i + #1
return
foofunc:
i <- #3
return
.Local i
This is nearly what I need - the only problem is with the
.Local i
which is defined at the end of the file - but it should rather be placed
at the beginning, at the same level as the
.CardByte c 5
to be compliant with my assembler syntax.
Unfortunately, I can't find any pointer about when to define common
labels (as they are called in the doc). What worries me too, is why an
initialized data (c here) is placed at the beginning, while an
uninitialized one (i) is placed at the end. I'm sure this can be solved
quite easily, but failed to find any suitable solution.
If needed, my (dirty) MD files are available at:
http://www.gnurou.org/camille.h
http://www.gnurou.org/camille.c
http://www.gnurou.org/camille.md
Thanks for any help,
Alex.
--
http://www.gnurou.org
More information about the Gcc
mailing list