From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25431 invoked by alias); 5 Mar 2010 22:48:27 -0000 Received: (qmail 25413 invoked by uid 22791); 5 Mar 2010 22:48:25 -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-gx0-f209.google.com (HELO mail-gx0-f209.google.com) (209.85.217.209) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 05 Mar 2010 22:48:20 +0000 Received: by gxk1 with SMTP id 1so665754gxk.16 for ; Fri, 05 Mar 2010 14:48:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.91.147.4 with SMTP id z4mr2166827agn.63.1267829298377; Fri, 05 Mar 2010 14:48:18 -0800 (PST) In-Reply-To: <4B918265.3060604@sebabeach.org> References: <20091227081006.GA23270@doriath.ww600.siemens.net> <4B39014D.4000203@sebabeach.org> <4B85589C.1030508@sebabeach.org> <4B918265.3060604@sebabeach.org> Date: Fri, 05 Mar 2010 22:48: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/msg00020.txt.bz2 On Sat, Mar 6, 2010 at 1:15 AM, Doug Evans wrote: > Dmitry Eremin-Solenikov wrote: >> >> 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 I= SA >>>>>> 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 be= yond >>>>> 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 >>>>> *should* >>>>> 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. =A0S= igh. >>> >>> It's easier to work with specific bugs though. =A0Can you send me your = port >>> 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-ut= ils >> >> You can browse code at >> >> http://m68hc08-utils.git.sourceforge.net/git/gitweb.cgi?p=3Dm68hc08-util= s/m68hc08-utils;a=3Dsummary >> >> If you'd prefer I can create a simple (2-3 insns) cut of the port, >> demonstrating the problem. >> >> > > Hi. > I've got a toolchain built and can run the gas testsuite. > Are these failures expected? > [just want to establish a baseline] > > Running /misc/dje/gnu/m68hc08/myrepo/gas/testsuite/gas/m68k/all.exp ... Hmmm. m68hc08 isn't an m68k-family device. --=20 With best wishes Dmitry