From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15637 invoked by alias); 21 Dec 2002 02:23:07 -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 15030 invoked from network); 21 Dec 2002 02:23:00 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (216.138.202.10) by 209.249.29.67 with SMTP; 21 Dec 2002 02:23:00 -0000 Received: from tooth.toronto.redhat.com (tooth.toronto.redhat.com [172.16.14.29]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 4FD6080007F; Fri, 20 Dec 2002 21:22:09 -0500 (EST) Received: from tooth.toronto.redhat.com (IDENT:/zjX6lpR72YwHj8xV7MAYitQHrR0Y1t/@localhost [127.0.0.1]) by tooth.toronto.redhat.com (8.12.5/8.12.5) with ESMTP id gBL2M8fo004609; Fri, 20 Dec 2002 21:22:09 -0500 Received: (from fche@localhost) by tooth.toronto.redhat.com (8.12.5/8.12.5/Submit) id gBL2M8uJ004607; Fri, 20 Dec 2002 21:22:08 -0500 Date: Fri, 20 Dec 2002 18:23:00 -0000 From: "Frank Ch. Eigler" To: David Carney Cc: cgen@sources.redhat.com Subject: Re: variable width instructions Message-ID: <20021221022208.GA4353@redhat.com> References: <200212201757.54789.dfcarney@net-itech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200212201757.54789.dfcarney@net-itech.com> User-Agent: Mutt/1.4i X-SW-Source: 2002-q4/txt/msg00119.txt.bz2 Hi - On Fri, Dec 20, 2002 at 05:57:54PM -0500, David Carney wrote: > [...] > My question is: how I should go about defining the instruction fields for > this architecture? I.e. what value should I use for the "start" fields in > "(define-ifield ...)" for the msb so that instruction fields are compatible > for both 16-bit and (the effectively) 32-bit instructions (15 or 31) ? There is a simple trick ... > My confusion stems from observing the line: > (dnf f-i32 "32 bit immediate" (SIGN-OPT) 16 32) > in fr30.cpu. Doesn't the "16 32" denote that the start of the opcode is at > bit 16, but the length is 32? Yes - methinks it's used by 48-bit-long instructions. The trick is that, for variable-length instruction sets, one should start numbering bits from the left (opcode) end. (Set lsb0=#f.) - FChE