From: Richard Henderson <richard.henderson@linaro.org>
To: Cupertino Miranda <Cupertino.Miranda@synopsys.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "linux-snps-arc@lists.infradead.org"
<linux-snps-arc@lists.infradead.org>,
Shahab Vahedi <Shahab.Vahedi@synopsys.com>,
"cupertinomiranda@gmail.com" <cupertinomiranda@gmail.com>,
Claudiu Zissulescu <Claudiu.Zissulescu@synopsys.com>
Subject: Re: QEmu ARC port - decoder implementation feedback
Date: Wed, 9 Jun 2021 09:39:23 -0700 [thread overview]
Message-ID: <0c90a8c4-0977-b11b-b543-9eef4d4d14c3@linaro.org> (raw)
In-Reply-To: <a882003d-4949-06ac-d111-8f41cb2d54b9@synopsys.com>
On 6/9/21 2:58 AM, Cupertino Miranda wrote:
> We started to do that and in the process we realize that the approach
> would bring us yet another encoding language description to maintain.
Why would you be maintaining another description? Your approach below with the
simple recursive algorithm appears to be no different.
> Also that decodetree alone would not allow us to properly disassembly
> code, still requiring to keep the initial structure.
Why is that?
The current uses of decodetree are quite complex, so I sincerely doubt that it
cannot do the job. You've asked no questions, nor have you described any
problems you have encountered.
That said, decodetree was merely a suggestion based on what appeared to me to
be a trivial automated textual rewrite of your current data set. If you want
to use something else that performs equally well, fine.
> So far, we did the following:
> - converted opcodes.def to macros instead of table entries.
Sure.
> - created a script that reads those entries and outputs macros that
> directly translate to a switch/case decision tree (example below), just
> like the ones produced by decodetree. The difference is that the switch
> will return the enum entry for the proper decoder structure instead of
> calling a translation function.
An enum result is fine, sure.
The example is not especially enlightening because you don't show the macro
definitions, or the expansion. Have you a link to a git repo that you can share?
> - the script can either be contributed in C or python language as it
> is based on a simple recursive algorithm.
Either is fine. We currently use both as build-time generators.
r~
next prev parent reply other threads:[~2021-06-09 16:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-09 9:58 QEmu ARC port - decoder implementation feedback Cupertino Miranda
2021-06-09 16:39 ` Richard Henderson [this message]
2021-06-09 20:00 ` Cupertino Miranda
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=0c90a8c4-0977-b11b-b543-9eef4d4d14c3@linaro.org \
--to=richard.henderson@linaro.org \
--cc=Claudiu.Zissulescu@synopsys.com \
--cc=Cupertino.Miranda@synopsys.com \
--cc=Shahab.Vahedi@synopsys.com \
--cc=cupertinomiranda@gmail.com \
--cc=linux-snps-arc@lists.infradead.org \
--cc=qemu-devel@nongnu.org \
/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 NNTP newsgroup(s).