This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: A question about porting GCC to a javachip
- To: "edward" <s892403 at ccit dot edu dot tw>
- Subject: Re: A question about porting GCC to a javachip
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sun, 20 Dec 1998 22:12:27 -0700
- cc: egcs at cygnus dot com
- Reply-To: law at cygnus dot com
First note, you need to fix the date on your machine.
In message <002701bdb225$74e2da00$0d25848c@pwf-9>you write:
> 1.In some porting reports , they indicate that it is easy to add a new =
> machine description to GCC --just add a few lines to =20
> "configure.in",but when I try to do it , I find that I have to create =
> my javachip.h(tm.h) &javachip.c(tm.c)&javachip.md(.md
> file)first in order to avoid some unexpecting problems.Is it =
> correct ?
When porting to a completely new architecture you will need to create new
files which describe the target machine.
> 2. In order to achieve the porting task , do I have to rewrite any =
> source code file in GCC , or all I have to do is to handle the=20
> four files above mentioned ?
Some ports require changing the target independent parts of the compiler,
some do not. There is no simple answer to this question.
> 3. Suppose that I have a sample test program test.c
[ ... ]
> Therefore, in order to achieve the task above mentioned . What =
> files should
> I have to modify ?
The .c, .h & .md files you mentioned above.
> And how should I do it ?
This is covered in the GCC manual. I highly recommend you read the sections
which describe the RTL langauge, the target macros and the format of the
machine description file (the .md file).
jeff