public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Lev Yudalevich <lyudalev@gmail.com>
To: cgen@sourceware.org
Subject: ifield's value processing -- help is needed
Date: Tue, 11 Jun 2013 09:58:00 -0000	[thread overview]
Message-ID: <CA+zUDe3_5DFAvGJKFAQfC+euXqQhi4WAj_9RDqCVAsJe_heQ9A@mail.gmail.com> (raw)

Hello,
(I'm not 100% sure if this is a correct place to ask, but I'd very
appreciate any answer)

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. My problem is that I can
not find a way to pass such a function (nor in Scheme neither in C) as
a part of the format list of an
instruction definition. Having user-defined parse and print handlers
(as for operand definitions) would have solve the problem, but there
are none for ifields. Another workaround is to hardcode all opcodes
for all isas, but in this case I have no way to distinguish between
different isas inside cgen_dis_hash function, which only gets a buffer
and a value as arguments.

Any advice is highly welcome.

Sincerely,
Lev.

             reply	other threads:[~2013-06-11  9:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-11  9:58 Lev Yudalevich [this message]
2013-06-11 14:24 ` Frank Ch. Eigler
2013-06-12  9:27   ` Lev Yudalevich
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+zUDe3_5DFAvGJKFAQfC+euXqQhi4WAj_9RDqCVAsJe_heQ9A@mail.gmail.com \
    --to=lyudalev@gmail.com \
    --cc=cgen@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).