From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10509 invoked by alias); 5 Mar 2010 22:15:13 -0000 Received: (qmail 10454 invoked by uid 22791); 5 Mar 2010 22:15:11 -0000 X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_00,DNS_FROM_RFC_BOGUSMX X-Spam-Check-By: sourceware.org Received: from sebabeach.org (HELO sebabeach.org) (64.165.110.50) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 05 Mar 2010 22:15:04 +0000 Received: from dhcp-172-19-110-107.mtv.corp.google.com (localhost.localdomain [127.0.0.1]) by sebabeach.org (Postfix) with ESMTP id BD7B56E3D4; Fri, 5 Mar 2010 14:15:01 -0800 (PST) Message-ID: <4B918265.3060604@sebabeach.org> Date: Fri, 05 Mar 2010 22:15:00 -0000 From: Doug Evans User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Dmitry Eremin-Solenikov CC: cgen@sources.redhat.com Subject: Re: cgen -> opcodes problem References: <20091227081006.GA23270@doriath.ww600.siemens.net> <4B39014D.4000203@sebabeach.org> <4B85589C.1030508@sebabeach.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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/msg00019.txt.bz2 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 != 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. cgen currently doesn't handle instructions with opcode bits beyond >>>> the base insn size very well. I 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. [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 = #f port. >>> >>> >>> >> Hi. It's very slow going, mostly because this isn't my day job. Sigh. >> >> It's easier to work with specific bugs though. Can you send me your port to >> try? Complete 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=m68hc08-utils/m68hc08-utils;a=summary > > 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 ... FAIL: cross-section branch FAIL: PIC generation FAIL: Incorrect Displacement too long error FAIL: operands FAIL: cas FAIL: bitfield FAIL: link FAIL: fmoveml FAIL: mcf-mov3q FAIL: mcf-movsr FAIL: mode5 FAIL: mcf-mac FAIL: mcf-emac FAIL: gas/m68k/mcf-coproc FAIL: gas/m68k/mcf-fpu FAIL: mcf-trap FAIL: mcf-wdebug FAIL: cpu32 FAIL: br-isaa.d FAIL: br-isab.d FAIL: br-isac.d FAIL: ctrl-1.d FAIL: ctrl-2.d FAIL: 68000 operands