From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12437 invoked by alias); 26 Feb 2010 11:39:30 -0000 Received: (qmail 12420 invoked by uid 22791); 26 Feb 2010 11:39:29 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40 X-Spam-Check-By: sourceware.org Received: from mail-yx0-f202.google.com (HELO mail-yx0-f202.google.com) (209.85.210.202) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 26 Feb 2010 11:39:24 +0000 Received: by yxe40 with SMTP id 40so1393776yxe.10 for ; Fri, 26 Feb 2010 03:39:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.91.164.27 with SMTP id r27mr296173ago.20.1267184362361; Fri, 26 Feb 2010 03:39:22 -0800 (PST) In-Reply-To: <4B85589C.1030508@sebabeach.org> References: <20091227081006.GA23270@doriath.ww600.siemens.net> <4B39014D.4000203@sebabeach.org> <4B85589C.1030508@sebabeach.org> Date: Fri, 26 Feb 2010 11:39:00 -0000 Message-ID: Subject: Re: cgen -> opcodes problem From: Dmitry Eremin-Solenikov To: Doug Evans Cc: cgen@sources.redhat.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2010-q1/txt/msg00017.txt.bz2 On Wed, Feb 24, 2010 at 7:49 PM, Doug Evans wrote: > Dmitry Eremin-Solenikov wrote: >> >> Hello all, >> >> Trying to continue this topic after a while. >> >> Doug Evans wrote: >> >> >>> >>> Dmitry Eremin-Solenikov wrote: >>> >>>> >>>> Hello all, >>>> >>>> I'm back to my m68hc08 binutils port done via cgen. Recently I've again >>>> stumbled upon a problem with instructions, whose base? length !=3D ISA >>>> base length. >>>> >>>> E.g. in the attached stripped test case, the 'ttt' instruction either >>>> (should be assembled as 0x9E 0xF1) is misencoded as 0xsmth 0x00. Is >>>> this my fault? Or is this the expected behaviour and I should define >>>> f-seccode in some other way? >>>> >>>> Could you please help me? >>>> >>>> >>>> >>> >>> Hi. =A0cgen currently doesn't handle instructions with opcode bits beyo= nd >>> the base insn size very well. =A0I have a sandbox with this fixed, but >>> it'll be awhile (month or more?) before it all gets checked in. >>> >> >> What is the current status of your sandbox? Do you have any patches >> available? >> Or any intermediate work? Can I/we do something to help you to clean this >> up? >> >> I'm currently trying to dig into ifmt-mask stuff, but it takes time... >> >> >>> >>> In the meantime, setting base-insn-bitsize to 16 may work. =A0[It *shou= ld* >>> work, but there may be attributes of your port I haven't taken into >>> account.] >>> >> >> Setting base-insn-bitsize to 16 break disassembler: it starts looking for >> 16-bit masks instead of 8-bit for each and every instruction, and this >> doesn't >> seem to work for lsb0 =3D #f port. >> >> > > Hi. =A0It's very slow going, mostly because this isn't my day job. =A0Sig= h. > > It's easier to work with specific bugs though. =A0Can you send me your po= rt to > try? =A0Complete sources for building binutils would be best (either as a > collection of patches or as a tarball I can ftp or some such). The port is maintained as a git tree at git://m68hc08-utils.git.sourceforge.net/gitroot/m68hc08-utils/m68hc08-utils You can browse code at http://m68hc08-utils.git.sourceforge.net/git/gitweb.cgi?p=3Dm68hc08-utils/m= 68hc08-utils;a=3Dsummary If you'd prefer I can create a simple (2-3 insns) cut of the port, demonstrating the problem. --=20 With best wishes Dmitry