This is the mail archive of the cgen@sources.redhat.com 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]

Re: sim's -DPROFILE=1 conflicts with CGEN's PROFILE attribute


Hi Greg,

   Now, A(PROFILE) erroneously expands to (1 << CGEN_HW_1) rather than
   the intended (1 << CGEN_HW_PROFILE).

   I see a couple solutions, and will provide a patch for whichever the
   maintainers prefer:
   1) fix desc-cpu.scm to no longer define & use A(x), but rather generate
      (1<<CGEN_HW_x) in-line.  Same for other definitions & uses of shorthand A(x).
   2) shift an underscore from the definition of A(x) and into the arg,
      like so:
   	#define A(a) (1 << CONCAT2 (CGEN_HW,a))
   	use: A(_PROFILE)

I'd prefer to see #1.  Macros are bad, m'kay?

Ben


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