public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Ben Elliston <bje@redhat.com>
To: cgen@sources.redhat.com
Subject: Re: cgen fundamentals
Date: Wed, 18 Dec 2002 17:31:00 -0000	[thread overview]
Message-ID: <m33couajly.fsf@scooby.brisbane.redhat.com> (raw)
In-Reply-To: <200212181823.41189.dfcarney@net-itech.com>

Hi David.  Welcome.

>>>>> "David" == David Carney <dfcarney@net-itech.com> writes:

  David> I was referred to cgen by a member of the binutils mailing
  David> list (Nick Clifton).  Being (virtually) a complete newbie to
  David> Scheme programming and cgen, I have a number of fairly
  David> fundamental questions that are likely best answered through
  David> this list, rather than trying to find information on the
  David> web...

This is probably the first mistake of most newcomers to CGEN -- it is
not necessary to know Scheme to write a CGEN port (although a
Scheme-aware editor can help!).  The CGEN input language just looks a
lot like Scheme, but in trying to treat them as equivalent, you'll get
yourself into more trouble than if you just consider your task to
learn ".cpu" ;-)

  David> two week teaching myself the basics of scheme, but I'm still
  David> confused about the exactly purpose of cgen.  I.e. what's the
  David> purpose of a 'gas' versus an 'opcodes' port?  What does cgen
  David> actually produce (and how do I produce and use it) ?  How do
  David> files created with cgen interface with binutils?

CGEN is a framework, in which CGEN applications run.  There are a
handful of these now: an opcodes table generator, a simulator kernel
generator, and so on.  If you just want to port binutils, you need
only concern yourself with generating the opcodes/* files.  The GNU
binutils "opcodes" directory has Makefile fragments for other ports
(like fr30) that can be duplicated almost verbatim.  These Makefile
fragment are responsible for running CGEN for you and depositing the
output files in the opcodes/ source directory.  I would suggest you
focus on writing your CPU description first and then work out how to
run it from opcodes/Makefile.

Please feel free to ask more questions on this otherwise quiet list!

Cheers, Ben


  reply	other threads:[~2002-12-19  1:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-18 15:23 David Carney
2002-12-18 17:31 ` Ben Elliston [this message]
2002-12-19 11:34   ` David Carney
2002-12-19 14:12     ` Ben Elliston
2002-12-19  4:51 ` Frank Ch. Eigler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m33couajly.fsf@scooby.brisbane.redhat.com \
    --to=bje@redhat.com \
    --cc=cgen@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).