This is the mail archive of the
cgen@sourceware.org
mailing list for the CGEN project.
Re: CGEN_BITSET
- From: Dave Brolley <brolley at redhat dot com>
- To: Doug Evans <dje at sebabeach dot org>
- Cc: cgen at sourceware dot org
- Date: Mon, 22 Jun 2009 11:59:53 -0400
- Subject: Re: CGEN_BITSET
- References: <4A3D6504.5010203@sebabeach.org>
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"))
))
)