insn_condition table

Bharati Bhole bharati.bhole@gmail.com
Tue Oct 31 06:17:00 GMT 2006


On 30 Oct 2006 09:16:28 -0800, Ian Lance Taylor <iant@google.com> wrote:
> "Bharati Bhole" <bharati.bhole@gmail.com> writes:
>
> > Could anybody please tell me when the insn_condition table is filled?
> > The executable of genrecog is called with .md file as argument, but
> > before the execution starts ie before stepping into main() the
> > insn_condition table gets already filled. i tried to trace through
> > debugger and put a break point on main(). Before doing step in main()
> > the insn_condition table was filled.
> > Please tell me when it get filles.
>
> genconditions creates build/gencondmd.c which contains the statically
> initialized array insn_conditions.  genrecog is linked against
> gencondmd.o.
>
> Ian
>

There is no build/gencondmd.c. there is insn-conditions.c though.
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.
And what macro IN_GCC does?
The code in genrecog.c is -

extern int main (int, char **);
int
main (int argc, char **argv)
{
  rtx desc;
  struct decision_head recog_tree, split_tree, peephole2_tree, h;

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

Bharati.



More information about the Gcc-help mailing list