From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10137 invoked by alias); 29 Oct 2003 16:37:51 -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 10127 invoked from network); 29 Oct 2003 16:37:50 -0000 Received: from unknown (HELO mail.msmarts.com) (66.127.92.140) by sources.redhat.com with SMTP; 29 Oct 2003 16:37:50 -0000 Received: from lisa.msmarts.com (192.168.1.199 [192.168.1.199]) by mail.msmarts.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id RYQ4KXLR; Wed, 29 Oct 2003 08:34:04 -0800 From: Ralph Escherich To: "Frank Ch. Eigler" Subject: Re: binutils porting to new CPU Date: Wed, 29 Oct 2003 16:37:00 -0000 User-Agent: KMail/1.5.9.1i Cc: cgen@sources.redhat.com References: <200310281821.24902.esche@mobilesmartsinc.com> <20031029024802.GA9756@redhat.com> In-Reply-To: <20031029024802.GA9756@redhat.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200310290839.13951.esche@mobilesmartsinc.com> X-SW-Source: 2003-q4/txt/msg00016.txt.bz2 Hi, Thanks for the explanation. I took a closer look at the output files (always a good idea before asking more questions :-). I can identify an API that seems to be used for the assembler instruction parsing part. There are a lot of other api parts where I can not really identify what they are used for Do you have a more detailed API description of what is generated and how it should be used for porting the binutils? If not, could you maybe provide me with enough information. I would volunteer to write it up as a howto, together with my experience of the porting job. Also gas/cgen.c contains code for fixups and parsing. How does all this fit into the big picture of porting binutils to a new cpu target? How do fixups and frags ??? fit into the API? Sorry for asking those basic porting questions, but I'm trying to get the big picture, so that I can determine how to tackle the porting task best. Esche On Tuesday 28 October 2003 18:48, Frank Ch. Eigler wrote: > Hi - > > > [...] > > My research on the web shows, that for a complete port of the binutils > > to a new cpu the follwing parts have to be modified/created: > > [...] > > include/opcodes/FOO.h - Port specific ISA encoding > > opcodes/FOO-dis.c - Port specific disassembler routines > > opcodes/FOO-opc.c - Port specific ISA encoding > > These are the only files generated by cgen for binutils, but you'll > notice that these are the primary ones that contain the most complex > aspects for supporting target processor. > > The others need to be built by hand. Of these, only the > bfd/{*}-FOO.c file has given me particular headaches, having to > represent object file relocations in a clunky way. (This part > motivated Red Hat to build a reusable generic relocation engine > for a particularly peculiar & reconfigurable target. This code > has not been made public though AFAIK.) > > > - FChE