This is the mail archive of the cgen@sourceware.org mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CGEN_BITSET


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"))
))
)




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]