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

Re: cgen fundamentals

Hi David,

>>>>> "David" == David Carney <> writes:

  David> So, basically, I define my own .cpu file and add a new target
  David> to the binutils/opcodes Makefile (that'll use cgen in
  David> conjunction with my .cpu file), correct?  After I get cgen to
  David> properly generate files for binutils/opcodes, I'll need to
  David> write my own cpu-???.* and elf32-???.* files for the
  David> binutils/bfd, right?

Yes.  There is relatively little work to do here (a few hundred lines
of C code).  You can start with an existing port and clone it.  Once
you get it working, you'll understand it much better and can go back
and clean it up.

  David> What else will I need to do to get an assembler up and
  David> running?

You'll need to write the appropriate gas/config/* files (ie. port
GAS).  This is mostly simplified, with a few #defines to set and some
stub functions that mostly call into cgen's "binutils" runtime
functions in opcodes and gas.

I'd strongly recommend you follow a CGEN-based gas/binutils port
closely for guidance once you get to that stage.

Good luck!


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