Re: [patch][rfa] Representation of ISA Attribute in CGEN

Dave Brolley <[email protected]>
Newsgroups gmane.comp.emulators.sid.devel,gmane.comp.tools.cgen.devel,gmane.comp.gnu.binutils,gmane.comp.gdb.patches
Message-ID <[email protected]>
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
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.