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

Ben Elliston bje@redhat.com
Tue Nov 14 16:29:00 GMT 2000


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



More information about the Cgen mailing list