This is the mail archive of the gcc@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]

A question about porting GCC to a javachip


Hi:
   
      I  am  a  student  who  major  in  Computer  Science , and  I  have  a  project  for  porting  GCC  to  a  Java  chip 
      However , when I  start  to  porting  with  some  implementations , I  encounter some problems  that  bothering  me .
      I know that there may even be people working on similar ports,  so  I  write  this mail to  you  wishing   to   get   some  
      help  from  you  about   the  following  questions . I  hope  it  would  not   bother  you   too  much !
 
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 
   "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 ? I mean that whether I have to handle  1.configure.in
    2.tm.h 3.tm.c  4. md file   at the same time.
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 
    four files above mentioned ?
3. Suppose that I have a sample test program test.c
    //test.c
    main()
    {
        int  i;
        i=99;
    }
    Because I do not have a cross-assembler & a cross-linker,all I want to do
    is porting GCC to make it compile test.c to generate test.s (source code
    level ).
      //test.s
      ...
      ...
      ldc  99
      ...
      ...
     I do not care the other directives in test.s as long as GCC can generate
     the instruction " ldc  99 ".
    
 
     Therefore, in order to achieve the task above mentioned . What files should
     I have to modify ? And how should I do it ? Could you please give me some
     detailed steps or illustrations ?
     (Host: i386-Linux , Build: i386-Linux,Target: javachip-none)
     Thanks anyway !!
  
                                                                     Edward<s892403@ccit.edu.tw>

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