public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: "Frank Ch. Eigler" <fche@redhat.com>
To: David Carney <dfcarney@net-itech.com>
Cc: cgen@sources.redhat.com
Subject: Re: cgen fundamentals
Date: Thu, 19 Dec 2002 04:51:00 -0000	[thread overview]
Message-ID: <20021219125151.GA24379@redhat.com> (raw)
In-Reply-To: <200212181823.41189.dfcarney@net-itech.com>

Hi -


On Wed, Dec 18, 2002 at 06:23:41PM -0500, David Carney wrote:
> [...] I'm still confused about 
> the exactly purpose of cgen.  I.e. what's the purpose of a 'gas' versus an 
> 'opcodes' port?  

Opcodes contains table-driven kernels for assemblers and disassemblers.
CGEN can generate these parts entirely.  The assembler needs some further
hand-made code, which goes into gas/config/tc-*.  A normal assembler will
produce relocatable object files, which requires further hand-made code
in bfd/* to handle.

> What does cgen actually produce (and how do I produce and use it) ?

In general, think of CGEN like a parser generator or a state machine
translator thingie.  It can create table-driven parts of the system,
but you still need to come up with the interface code.  This is normally
done by copying another existing simple port, then modifying it to taste.

> How do files created with cgen interface with binutils? [...]

Unfortunately, the interfaces between cgen-generated code and their
callers/callees is not clearly designed.  If you were interested in the
gory details, you'd need to run the assembler under gdb while it's at
work.  It has an inner beauty, I suppose, an ugly one.


- FChE

      parent reply	other threads:[~2002-12-19 12:51 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
2002-12-19 11:34   ` David Carney
2002-12-19 14:12     ` Ben Elliston
2002-12-19  4:51 ` Frank Ch. Eigler [this message]

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=20021219125151.GA24379@redhat.com \
    --to=fche@redhat.com \
    --cc=cgen@sources.redhat.com \
    --cc=dfcarney@net-itech.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).