gcc port based on MIPS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,
 I'm trying to port gcc for a processor which is very similar to
MIPS.Today i just tried to compile gcc-4.1.0 for this processor by
changing configuration files.
First i changed the config.sub file in base directory and just added
the name of processor ABC.
Then i changed the configure.ac file in gcc/ subdirectory and added
following lines.

 ABC*)
   conftest_s='
       .section .tdata,"awT",@progbits
x:
       .word 2
       .text
       addiu $4, $28, %tlsgd(x)
       addiu $4, $28, %tlsldm(x)
       lui $4, %dtprel_hi(x)
       addiu $4, $4, %dtprel_lo(x)
       lw $4, %gottprel(x)($28)
       lui $4, %tprel_hi(x)
       addiu $4, $4, %tprel_lo(x)'
       tls_first_major=2
       tls_first_minor=16
       tls_as_opt='-32 --fatal-warnings'
       ;;
As you can see it was just copy paste of  mips*-*-*) option.

Then i did following changes to config.gcc file in gcc/ subdirectory

ABC*)
       cpu_type=ABC
       ;;
- - - - - - - - - - -
- - - -- - - - - - --
ABC*)
       tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} ABC/linux.h"
       ;;


Then i made  a directory  gcc-4.1.0/gcc/config/ABC/.I copied all files
of gcc-4.1.0/gcc/config/mips to ABC directory and renamed following
files.

mips.h                  --------------   ABC.h
mips.md               --------------    ABC.md
mips.c                  --------------    ABC.c
mips-modes.def     -------------    ABC-modes.def
mips-protos.h        -------------     ABC-protos.h
mips.opt               -------------     ABC.opt

But when i issued the make all-gcc command .Following error occured

../../gcc-4.1.0/gcc/config/ABC/ABC.md: unknown mode `V2SF'

Would u please explain why this error is being generated.Also a bit of
explaination of 'V2SF' mode will helpful.

Then i removed the 'V2SF' mode from patterns in ABC.md file.But now
following error was generated.

../../gcc-4.1.0/gcc/config/ABC/ABC.md:228: unknown value
`<ANYF:UNITMODE>' for `mode' attribute
../../gcc-4.1.0/gcc/config/ABC/ABC.md:228: unknown value
`<ANYF:UNITMODE>' for `mode' attribute
../../gcc-4.1.0/gcc/config/ABC/ABC.md:228: unknown value `<UNITMODE>'
for `mode' attribute
../../gcc-4.1.0/gcc/config/ABC/ABC.md:228: unknown value `<UNITMODE>'
for `mode' attribute


Would you please tell me why this error is being generated.

thanks,
shahzad


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux