CGEN_BITSET
Doug Evans
dje@sebabeach.org
Mon Jun 22 16:19:00 GMT 2009
Hi. Thanks.
More than 32 ISAs? Yikes!
Going forward, we could add a vbitset attribute kind (or some such), or
we could convert all bitsets to use CGEN_BITSET. I guess I'm leaning
toward the latter, but I can imagine situations where one would rather
just have an unsigned int.
Dave Brolley wrote:
> 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