From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9663 invoked by alias); 19 Dec 2002 01:31:24 -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 9651 invoked from network); 19 Dec 2002 01:31:22 -0000 Received: from unknown (HELO main.gmane.org) (80.91.224.249) by 209.249.29.67 with SMTP; 19 Dec 2002 01:31:22 -0000 Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18OpW4-0000Ti-00 for ; Thu, 19 Dec 2002 02:30:24 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: cgen@sources.redhat.com Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18OpNY-0008CX-00 for ; Thu, 19 Dec 2002 02:21:36 +0100 Path: not-for-mail From: Ben Elliston Subject: Re: cgen fundamentals Date: Wed, 18 Dec 2002 17:31:00 -0000 Organization: Red Hat Asia-Pacific Pty Ltd Message-ID: References: <200212181823.41189.dfcarney@net-itech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@main.gmane.org User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter) Cache-Post-Path: webdevap.brisbane.redhat.com!unknown@scooby.brisbane.redhat.com X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) X-SW-Source: 2002-q4/txt/msg00112.txt.bz2 Hi David. Welcome. >>>>> "David" == David Carney 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