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
Greg McGary writes:
> There is a third solution solution:
>
> 3) Define A like so (e.g., for _HW_):
>
> #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
> #define A(a) (1 << CGEN_HW_##a)
> #else
> #define A(a) (1 << CGEN_HW_/**/a)
> #endif
Ah, indeed.
> > An alternative is to rename CGEN_{FOO}_{ATTRIBUTE} to
> > CGEN_{FOO}_A_{ATTRIBUTE}. Having attributes named like
> > CGEN_INSN_RELAXABLE kinda bothered me anyway, whereas
> > I much more like CGEN_INSN_A_RELAXABLE [or s/_A_/_ATTR_/].
>
> How does this address the original problem?
because you then use A(ATTR_PROFILE). I agree the problem is still
there but much less so.
> Note that this is a generic problem, and not specific to i960. Many
> CPUs have `-DPROFILE=1' by default in sim/*/configure, and many CGEN
> cpu descriptions have have a PROFILE attribute.
In a way, yes, but it only hits the i960 because the others
have their desc.c/opc.c files built in the opcodes dir.
[pedantic: it's still a problem that needs a general solution]