This is the mail archive of the
cgen@sourceware.org
mailing list for the CGEN project.
Re: ifield's value processing -- help is needed
- From: "Frank Ch. Eigler" <fche at redhat dot com>
- To: Lev Yudalevich <lyudalev at gmail dot com>
- Cc: cgen at sourceware dot org
- Date: Tue, 11 Jun 2013 10:20:00 -0400
- Subject: Re: ifield's value processing -- help is needed
- References: <CA+zUDe3_5DFAvGJKFAQfC+euXqQhi4WAj_9RDqCVAsJe_heQ9A at mail dot gmail dot com>
Hi -
> (I'm not 100% sure if this is a correct place to ask, [...]
It is.
> I'm wandering if there is a possibility to specify (either in a `.cpu'
> file or in a corresponding `.opc' file) an additional processing
> function for a value of an instruction's ifield. For example, I'd like
> to define several isa sets. Suppose that these sets differ by opcode
> values only. In this case, I may supply a simple lookup function that
> picks the correct value depending on the isa. [...]
Have you considered using macros to expand to explicit isa-specific
instructions (basically generating the cartesian product of
instruction X isa in the cgen model), as opposed to trying to do this
selection based upon a run-time function call?
- FChE