* Doubt about insn-codes and 'gencodes' program
@ 2007-02-09 14:28 Bhaskar Reddy
2007-02-09 17:40 ` Ian Lance Taylor
0 siblings, 1 reply; 2+ messages in thread
From: Bhaskar Reddy @ 2007-02-09 14:28 UTC (permalink / raw)
To: gcc-help
Hi,
After building gcc, in build/gcc, we can find insn-codes.h which contains,
enumeration 'insn_code' numbering of define_insn pattern by their name.
for some patterns, it contains value 'CODE_FOR_nothing' and for some
patterns it assigns an integer value.
For example:
#define CODE_FOR_extendhidi2 CODE_FOR_nothing
#define CODE_FOR_extendqidi2 CODE_FOR_nothing
CODE_FOR_extendhisi2 = 81,
CODE_FOR_extendqihi2 = 82,
CODE_FOR_extendqisi2 = 83,
CODE_FOR_truncxfsf2_i387_noop = 96,
CODE_FOR_truncxfdf2_i387_noop = 100,
i686-linux-gnu is the target machine, for which my compiler was build.
From the enum like above , How can i figure out which are the instructions
corresponding to 'i386' only.? [ as i386.md file was used for many other
cpu-types also, like pentium, k6 etc., am i getting this confusion! ]
TIA,
--
Bhaskar
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Doubt about insn-codes and 'gencodes' program
2007-02-09 14:28 Doubt about insn-codes and 'gencodes' program Bhaskar Reddy
@ 2007-02-09 17:40 ` Ian Lance Taylor
0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2007-02-09 17:40 UTC (permalink / raw)
To: Bhaskar Reddy; +Cc: gcc-help
"Bhaskar Reddy" <bhaskar@cse.iitb.ac.in> writes:
> After building gcc, in build/gcc, we can find insn-codes.h which contains,
> enumeration 'insn_code' numbering of define_insn pattern by their name.
>
> for some patterns, it contains value 'CODE_FOR_nothing' and for some
> patterns it assigns an integer value.
>
> For example:
>
> #define CODE_FOR_extendhidi2 CODE_FOR_nothing
> #define CODE_FOR_extendqidi2 CODE_FOR_nothing
> CODE_FOR_extendhisi2 = 81,
> CODE_FOR_extendqihi2 = 82,
> CODE_FOR_extendqisi2 = 83,
> CODE_FOR_truncxfsf2_i387_noop = 96,
> CODE_FOR_truncxfdf2_i387_noop = 100,
>
> i686-linux-gnu is the target machine, for which my compiler was build.
>
> From the enum like above , How can i figure out which are the instructions
> corresponding to 'i386' only.? [ as i386.md file was used for many other
> cpu-types also, like pentium, k6 etc., am i getting this confusion! ]
From the list above, you can't.
The only way to figure out which processors an insn pattern applies to
is to look at the insn predicates. I think it would be simplest to
look at the .md file. But, if you want, you can look at the macros in
the generated file insn-flags.h.
Ian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-02-09 16:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-09 14:28 Doubt about insn-codes and 'gencodes' program Bhaskar Reddy
2007-02-09 17:40 ` Ian Lance Taylor
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).