From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20550 invoked by alias); 28 Oct 2005 20:35:29 -0000 Mailing-List: contact sid-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: sid-owner@sources.redhat.com Received: (qmail 20468 invoked by uid 22791); 28 Oct 2005 20:35:21 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 28 Oct 2005 20:35:21 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j9SKZJuF010860; Fri, 28 Oct 2005 16:35:19 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j9SKZJV20920; Fri, 28 Oct 2005 16:35:19 -0400 Received: from [172.16.14.227] (IDENT:SzUxdThzxU2xK0aI95PPOLoDslaaVOPL@topaz.toronto.redhat.com [172.16.14.227]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id j9SKZISh019710; Fri, 28 Oct 2005 16:35:18 -0400 Message-ID: <43628B86.20101@redhat.com> Date: Fri, 28 Oct 2005 20:35:00 -0000 From: Dave Brolley User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) MIME-Version: 1.0 To: Dave Brolley CC: cgen@sources.redhat.com, binutils@sources.redhat.com, gdb-patches@sources.redhat.com, sid@sources.redhat.com Subject: Re: [patch][rfa] Representation of ISA Attribute in CGEN References: <433319E3.9060307@redhat.com> In-Reply-To: <433319E3.9060307@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-q4/txt/msg00005.txt.bz2 This patch has now been committed..... Dave Brolley wrote: > Hi, > > These changes have been in our local tree for a few years now and were > developed for an internal port which requires *much* more than 32 ISAs > or even 64 ISAs. These changes could be of benifit to others, so I > would like to submit them for approval. > > Currently, ISA is represented as an integer, like all the other > non-boolean attributes. It is a bit mask with each bit representing > whether a particular ISA is supported. Our port requires that there be > no fixed limit on the number of ISAs, and so, we developed an > open-ended representation for a bitset using a bitstring and a length. > It is called CGEN_BITSET and is declared in > include/opcode/cgen-bitset.h and supported by several new functions in > opcodes/cgen-opc.c. All manipulation of these bitsets is done using > these functions which hide the internal representation. See > cgen-bitset.h (attached) for a description of the implementation > > The patch has 3 parts: > 1) Extension of CGEN_ATTR_VALUE_TYPE to be a union allowing the use of > CGEN_BITSET as well as its supporting macros. > > 2) Changes to CGEN so that it generates code to correctly access and > initialize the new definition of CGEN_ATTR_VALUE_TYPE and to use the > proper cover functions when manipulating ISAs. > > 3) Changes to hand written portions of existing opcodes, sim and sid > ports as in 2). Fortunately, the use of existing CGEN macros made > these changes minimal. > > I have also included in the patch the regenerated source for the frv > port so that you can see the effect on the generated code. None of the > generated code for existing sid ports is affected. > > One natural extension of this work would be use the same > representation for all bitset attributes in CGEN. I believe that MACH > is the only other one at this time. > > Seeking comments and approval to commit. > > Thanks, > Dave >