From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12866 invoked by alias); 29 Oct 2003 02:20:58 -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 12851 invoked from network); 29 Oct 2003 02:20:57 -0000 Received: from unknown (HELO mail.msmarts.com) (66.127.92.140) by sources.redhat.com with SMTP; 29 Oct 2003 02:20:57 -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 RYQ4KXJ8; Tue, 28 Oct 2003 18:17:11 -0800 From: Ralph Escherich To: cgen@sources.redhat.com Subject: binutils porting to new CPU Date: Wed, 29 Oct 2003 02:20:00 -0000 User-Agent: KMail/1.5.9.1i MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200310281821.24902.esche@mobilesmartsinc.com> X-SW-Source: 2003-q4/txt/msg00014.txt.bz2 Hi, I wanted to port the gnu gcc and binutils to a new cpu architecture. Searching on the web revealed, that cgen should be able to generate all necessary modifications for the binutils portion from a single cpu description file. Searching through the cgen mailing list, I was able to get cgen running. It generates appropriate files in the binutils/opcode directory, but nothing else. 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: Basically you will need to create these files. (Replace FOO with the name of your chip): gas/config/tc-FOO.h - Customisation of generic parts of the assembler gas/config/tc-FOO.c - Port specific parts of the assembler include/{coff|elf}/FOO.h - Port specific header file include/opcodes/FOO.h - Port specific ISA encoding opcodes/FOO-dis.c - Port specific disassembler routines opcodes/FOO-opc.c - Port specific ISA encoding bfd/{elf32|coff}-FOO.c - Port specific relocation handlers bfd/cpu-FOO.c - Port specific description of the CPU ld/scripttempl/FOO.sc - Port specific linker template file ld/emulparam/FOO.sh - Port specific linker customisation You will also need to add support for your chip to the various configuration files: gas/configure.in opcodes/configure.in bfd/configure.in bfd/config.bfd bfd/archures.c bfd/reloc.c ld/configure.in ld/configure.tgt include/dis-asm.h So my basic questions: 1.) Is cgen supposed to do all the above changes, file generations? 2.) If not all, what does it generate and how can it really be used? Esche