From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2588 invoked by alias); 19 Dec 2002 12:51:56 -0000 Mailing-List: contact cgen-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sources.redhat.com Received: (qmail 2569 invoked from network); 19 Dec 2002 12:51:52 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 19 Dec 2002 12:51:52 -0000 Received: from tooth.toronto.redhat.com (tooth.toronto.redhat.com [172.16.14.29]) by touchme.toronto.redhat.com (Postfix) with ESMTP id C6D2B800075; Thu, 19 Dec 2002 07:51:51 -0500 (EST) Received: from tooth.toronto.redhat.com (IDENT:jgit5AkabO/INtUnXIspSw/p5cYXkCVN@localhost [127.0.0.1]) by tooth.toronto.redhat.com (8.12.5/8.12.5) with ESMTP id gBJCppfo025857; Thu, 19 Dec 2002 07:51:51 -0500 Received: (from fche@localhost) by tooth.toronto.redhat.com (8.12.5/8.12.5/Submit) id gBJCppNT025855; Thu, 19 Dec 2002 07:51:51 -0500 Date: Thu, 19 Dec 2002 04:51:00 -0000 From: "Frank Ch. Eigler" To: David Carney Cc: cgen@sources.redhat.com Subject: Re: cgen fundamentals Message-ID: <20021219125151.GA24379@redhat.com> References: <200212181823.41189.dfcarney@net-itech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200212181823.41189.dfcarney@net-itech.com> User-Agent: Mutt/1.4i X-SW-Source: 2002-q4/txt/msg00113.txt.bz2 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