From: Lev Yudalevich <lyudalev@gmail.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: cgen@sourceware.org
Subject: Re: ifield's value processing -- help is needed
Date: Wed, 12 Jun 2013 09:27:00 -0000 [thread overview]
Message-ID: <CA+zUDe2GQtLW4uE0hZdsPY6bisCFzrwNERv3XyV+R_dhY-j_AA@mail.gmail.com> (raw)
In-Reply-To: <20130611142000.GA31128@redhat.com>
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
next prev parent reply other threads:[~2013-06-12 9:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-11 9:58 Lev Yudalevich
2013-06-11 14:24 ` Frank Ch. Eigler
2013-06-12 9:27 ` Lev Yudalevich [this message]
2013-06-12 22:52 ` Frank Ch. Eigler
2013-06-16 13:59 ` Lev Yudalevich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+zUDe2GQtLW4uE0hZdsPY6bisCFzrwNERv3XyV+R_dhY-j_AA@mail.gmail.com \
--to=lyudalev@gmail.com \
--cc=cgen@sourceware.org \
--cc=fche@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).