From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7986 invoked by alias); 27 Sep 2002 15:02:57 -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 7979 invoked from network); 27 Sep 2002 15:02:56 -0000 Received: from unknown (HELO boden.synopsys.com) (204.176.20.19) by sources.redhat.com with SMTP; 27 Sep 2002 15:02:56 -0000 Received: from maiden.synopsys.com (maiden.synopsys.com [146.225.100.170]) by boden.synopsys.com (Postfix) with ESMTP id 135F2E0D7; Fri, 27 Sep 2002 08:02:55 -0700 (PDT) Received: from fr02.synopsys.com (localhost [127.0.0.1]) by maiden.synopsys.com (8.9.1/8.9.1) with ESMTP id IAA10678; Fri, 27 Sep 2002 08:03:23 -0700 (PDT) Received: from michaelclap (localhost [127.0.0.1]) by fr02.synopsys.com (8.9.1/8.9.1) with SMTP id RAA10447; Fri, 27 Sep 2002 17:02:49 +0200 (MET DST) From: "Michael Chapman" To: "Frank Ch. Eigler" , "Michael Chapman" Cc: Subject: RE: Weirdness in disassembly Date: Fri, 27 Sep 2002 08:02:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 In-Reply-To: <20020927105052.B17426@redhat.com> X-SW-Source: 2002-q3/txt/msg00079.txt.bz2 Hi, That was a quick answer! No - there are no fixed bit patterns in the second 16 bits. They are just used for offsets or absolute addresses. Everything is little endian. I just changed what you said - it does not seemt to change anything - (yes I regenerated the files!) It is true a haven't really understood what the lengths really all mean. I have at the moment:- (define-isa ; Name of the ISA. (name dw32) (comment "Basic DW32 instruction set") ; (Size of unknown instructions) (default-insn-word-bitsize 16) ; Shortest instruction is 16 bits (default-insn-bitsize 16) (base-insn-bitsize 32) ) Any more ideas? Mike -----Original Message----- From: Frank Ch. Eigler [mailto:fche@redhat.com] Sent: Friday, 27 September, 2002 16:51 To: Michael Chapman Cc: cgen@sources.redhat.com Subject: Re: Weirdness in disassembly Hi - On Fri, Sep 27, 2002 at 04:46:42PM +0200, Michael Chapman wrote: > I have just started out to experiment with cgen. Welcome! > I have instructions which are 16 and 32 bits long. > The assembler generates the right instructions with > the right lengths. [...] The choice of parameters in the define-isa clause is crucial for variable-length instruction sets. If any of your 32-bit instructions contain any fixed bit patterns in the second 16 bits, you need to set "base-insn-bitsize 32", since opcodes/simulators will need to fetch 32 bits to uniquely identify a cgen-level instruction. Setting that to 16 could explain what you're seeing. - FChE