This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
Re: sim's -DPROFILE=1 conflicts with CGEN's PROFILE attribute
- To: Greg McGary <greg at mcgary dot org>
- Subject: Re: sim's -DPROFILE=1 conflicts with CGEN's PROFILE attribute
- From: Ben Elliston <bje at redhat dot com>
- Date: Wed, 15 Nov 2000 11:29:50 +1100 (EST)
- Cc: <cgen at sourceware dot cygnus dot com>
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