This is the mail archive of the cgen@sourceware.org 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]
Other format: [Raw text]

Re: ifield's value processing -- help is needed


Thank you very much for the reply, Frank!

Right, I can write instruction definitions using macros. But then I'd
have to deal with this full cartesian product of instruction X isa,
which is exactly what I'm trying to avoid, as it creates much more
headache (for example, I'd have to know the currently active isa
inside the cgen_dis_hash function and I couldn't find a guide or an
example of using CGEN_COMPUTE_ISA, except for a mention of its
existence in the CGEN documentation). On the contrary, by using a
run-time function I'd be able to converge (i.e. to map) all isas into
a singe virtual one, on which I can perform any processing or analysis
I might need later. Do you think it is a correct and a possible
approach? If not, would you be so kind to give me a hint of how to
write CGEN_COMPUTE_ISA please?

Sincerely,
Lev.

On Tue, Jun 11, 2013 at 5:20 PM, Frank Ch. Eigler <fche@redhat.com> wrote:
> 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


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