This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

binutils porting to new CPU


Hi,

I wanted to port the gnu gcc and binutils to a new cpu architecture. Searching
on the web revealed, that cgen should be able to generate all necessary 
modifications for the binutils portion from a single cpu description file.

Searching through the cgen mailing list, I was able to get cgen running. It
generates appropriate files in the binutils/opcode directory, but nothing 
else.

My research on the web shows, that for a complete port of the binutils
to a new cpu the follwing parts have to be modified/created:


Basically you will need to create these files.  (Replace FOO with the
name of your chip):

  gas/config/tc-FOO.h           - Customisation of generic parts of the 
assembler
  gas/config/tc-FOO.c           - Port specific parts of the assembler
  include/{coff|elf}/FOO.h      - Port specific header file
  include/opcodes/FOO.h         - Port specific ISA encoding
  opcodes/FOO-dis.c             - Port specific disassembler routines
  opcodes/FOO-opc.c             - Port specific ISA encoding
  bfd/{elf32|coff}-FOO.c        - Port specific relocation handlers
  bfd/cpu-FOO.c                 - Port specific description of the CPU
  ld/scripttempl/FOO.sc         - Port specific linker template file
  ld/emulparam/FOO.sh           - Port specific linker customisation

You will also need to add support for your chip to the various
configuration files:

  gas/configure.in
  opcodes/configure.in
  bfd/configure.in
  bfd/config.bfd
  bfd/archures.c
  bfd/reloc.c
  ld/configure.in
  ld/configure.tgt
  include/dis-asm.h

So my basic questions: 
1.) Is cgen supposed to do all the above changes, file generations?
2.) If not all, what does it generate and how can it really be used?

Esche







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