From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7290 invoked by alias); 14 Jan 2009 17:09:56 -0000 Received: (qmail 7280 invoked by uid 22791); 14 Jan 2009 17:09:55 -0000 X-SWARE-Spam-Status: No, hits=1.6 required=5.0 tests=AWL,BAYES_50 X-Spam-Check-By: sourceware.org Received: from newnhamgroup.com (HELO newnhamgroup.com) (207.44.130.99) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Jan 2009 17:09:14 +0000 Received: from [194.73.38.218] (helo=NewnhamResearch.com) by newnhamgroup.com with esmtpsa (TLSv1:RC4-MD5:128) (Exim 4.68) (envelope-from ) id 1LN9Et-00069O-0E for cgen@sources.redhat.com; Wed, 14 Jan 2009 11:09:11 -0600 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: How does CGEN decide what ifields to use for CGEN_IVALUE? Date: Wed, 14 Jan 2009 17:09:00 -0000 Message-ID: From: "John Stubley" To: X-Legal-UK: DisplayLink (UK) Limited. Registered in England No. 04811048. Mount Pleasant House, Mount Pleasant, Cambridge, CB3 0RN, United Kingdom. X-Legal-US: DisplayLink Corp. A US incorporated company. 480 S. California Avenue Ste 304, Palo Alto, CA 94306, USA. Mailing-List: contact cgen-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sourceware.org X-SW-Source: 2009-q1/txt/msg00004.txt.bz2 Hi, I am writing a binutils port for our own internal proprietary CPU using CGEN. I am using binutils v2.19 stable and cgen monthly snapshot 20081101. I am seeing some odd behaviour in the disassembly shown by objdump when it is analysing the opcodes I am generating using GAS. In some cases, if I change the value of an operand I can cause the disassembler to fail to recognise the opcode. Our instruction packing is quite tight and so some of the operand fields overlap with some of the opcode mnemonic fields. I have tried to define the instruction families so that they don't overlap, but I can't quite do it. Ideally, I would like to teach CGEN a simple hierarchy of mnemonics so that it can order the opcode table correctly. However, it appears at first instance that there is no way to write the .cpu file to give CGEN enough hints. I assume it has something to do with the CGEN_OPCODE_* macros for CGEN_IVALUE in cgen.h. I have tried setting the decode-assist in the define-isa, but this appears to have no effect. I would appreciate any pointers that you could give me, particularly if there is an existing CPU that attempts something similar. With thanks, John Stubley Development Engineer DisplayLink (UK) Limited