CGEN_BITSET

Dave Brolley brolley@redhat.com
Mon Jun 22 16:00:00 GMT 2009


Hi Doug,

The mep port required an inderminate and configurable number of ISA's to 
be possible, so we needed something that could represent an unspecified 
number of bits (more then 32 or 64 possibly) in a mask. The intent was 
not to treat isa specially. It just turned out to be the first bit mask 
to require this treatment.

CGEN_BITSET is simply a bit mask represented by character strings as 
opposed to integers.

Dave

Doug Evans wrote:
> Treating "isa" specially is a bit of a hack.  What's the story behind 
> CGEN_BITSET?
>
> (define (gen-attr-type attr)
>  (if (string=? (string-downcase (gen-sym attr)) "isa")
>      "CGEN_BITSET"
>      (case (attr-kind attr)
>        ((boolean) "int")
>        ((bitset)  "unsigned int")
>        ((integer) "int")
>        ((enum)    (string-append "enum " (string-downcase (gen-sym 
> attr)) "_attr"))
>        ))
> )
>



More information about the Cgen mailing list