This is the mail archive of the gcc-help@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: insn_condition table


"Bharati Bhole" <bharati.bhole@gmail.com> writes:

> There is no build/gencondmd.c. there is insn-conditions.c though.

Sorry, you're right, that is how it used to work.  That's not how it
works now.

> And insn-conditions.c is genrated by genconditions and its .o file is
> liked with genrecog.
> The problem is that, genconditions.c contains main() and genrecog.c
> also contains main() (and there is extern declaration main() in
> genrecog.c) so when the files are linked which main() is called 1st.

If two objects file define the same symbol, you can't link them
together.  So it is safe to conclude that genconditions.o and
genrecog.o are not linked together.  What happens is that
genconditions.o is linked into genconditions, which generates
insn-conditions.c, which is compiled into insn-conditions.o.  And
insn-conditions.o is linked with genrecog.o to produce genrecog (and
insn-conditions.o is also linked into other gen* programs).

> And what macro IN_GCC does?

It indicates whether the file is being compiled in gcc tiself or in a
helper program such as genrecog.

> Please tell me the starting point of the exe file genrecog.

It starts at main, of course.

Ian


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