This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
relevant files for target backends
- From: Markus Franke <Markus dot Franke at informatik dot tu-chemnitz dot de>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 16 Jan 2007 11:24:56 +0100
- Subject: relevant files for target backends
- Reply-to: Markus dot Franke at informatik dot tu-chemnitz dot de
Dear GCC Developers/Users,
I am trying to port a backend from GCC version 2.7.2.3 to version 4.1.1.
As far as I have seen, a lot of new relevant files were introduced to
build a good structure for new backends.
I am wondering where to define the prototypes for functions in
<machine>.c Shall the prototypes be defined in <machine>-protos.h or in
<machine>.h or in <machine>.c. As far as I understand the prototypes
should be defined in <machine>-protos.h, right? But if I do so several
errors/warnings arise because of undeclared prototypes.
Another question is where target macros should be defined. As far as I
can see <machine>.c has something like such a structure:
---snip---
#define <SOME_MACRO>
#define <SOME_MACRO>
#define <SOME_MACRO>
#define <SOME_MACRO>
struct gcc_target targetm = TARGET_INITIALIZER;
---snap---
But there are also a lot of macros defined in <machine>.h. What kind of
macros should be defined in <machine>.h and which macros should be
defined in <machine>.c?
I try to write good and standardised code in order to contribute my
development. I would appreciate any help. By the way, I already had a
look in the GCC Internals manual but I am still a bit confused.
Thanks in advance and regards,
Markus Franke