From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6080 invoked by alias); 6 Aug 2003 18:23:33 -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 6073 invoked from network); 6 Aug 2003 18:23:32 -0000 Received: from unknown (HELO neon-gw.transmeta.com) (63.209.4.196) by sources.redhat.com with SMTP; 6 Aug 2003 18:23:32 -0000 Received: (from root@localhost) by neon-gw.transmeta.com (8.9.3/8.9.3) id LAA05257; Wed, 6 Aug 2003 11:23:27 -0700 Received: from mailhost.transmeta.com(10.1.1.15) by neon-gw.transmeta.com via smap (V2.1) id xma005236; Wed, 6 Aug 03 11:23:02 -0700 Received: from casey.transmeta.com (casey.transmeta.com [10.10.25.22]) by deepthought.transmeta.com (8.11.6/8.11.6) with ESMTP id h76IN6315019; Wed, 6 Aug 2003 11:23:06 -0700 (PDT) Received: (from dje@localhost) by casey.transmeta.com (8.9.3/8.7.3) id LAA18592; Wed, 6 Aug 2003 11:23:06 -0700 From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16177.18314.104243.96490@casey.transmeta.com> Date: Wed, 06 Aug 2003 20:50:00 -0000 To: Michael Meissner cc: cgen@sources.redhat.com Subject: Types and other issues with cgen In-Reply-To: <16177.14973.213564.499122@casey.transmeta.com> References: <20030806024506.GA12937@tiktok.the-meissners.org> <16177.14973.213564.499122@casey.transmeta.com> X-SW-Source: 2003-q3/txt/msg00027.txt.bz2 Doug Evans writes: > > Michael writes > > 2) Cgen has a type mechanism (DI/SI/etc.) but it doesn't seem to be used in the > > actual code for at least the assembler and disassembler > > Using the modes in the assembler/disassembler isn't the right way to go. > These modes are for semantic operation, not assembly/disassembly. > Imagine some instruction with an immediate operand that is a fixed > set of constants that is encoded with special magic numbers. > Register indices are another example. > There's a disconnect between representation in the instruction > and use during semantic evaluation. Blech. I should have let my reply sit in my head awhile before ^c^c-ing. Here's my proposal. We record in cgen_fields a type big enough to hold the field (or some minor variant thereof) and have inserters/extractors for each type in use.