public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* ifield's value processing -- help is needed
@ 2013-06-11  9:58 Lev Yudalevich
  2013-06-11 14:24 ` Frank Ch. Eigler
  0 siblings, 1 reply; 5+ messages in thread
From: Lev Yudalevich @ 2013-06-11  9:58 UTC (permalink / raw)
  To: cgen

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-06-16 13:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-11  9:58 ifield's value processing -- help is needed Lev Yudalevich
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

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).