This is the mail archive of the
cgen@sourceware.org
mailing list for the CGEN project.
Re: ifield's value processing -- help is needed
- From: "Frank Ch. Eigler" <fche at redhat dot com>
- To: Lev Yudalevich <lyudalev at gmail dot com>
- Cc: cgen at sourceware dot org
- Date: Wed, 12 Jun 2013 18:52:48 -0400
- Subject: Re: ifield's value processing -- help is needed
- References: <CA+zUDe3_5DFAvGJKFAQfC+euXqQhi4WAj_9RDqCVAsJe_heQ9A at mail dot gmail dot com> <20130611142000 dot GA31128 at redhat dot com> <CA+zUDe2GQtLW4uE0hZdsPY6bisCFzrwNERv3XyV+R_dhY-j_AA at mail dot gmail dot com>
Hi -
On Wed, Jun 12, 2013 at 12:27:06PM +0300, Lev Yudalevich wrote:
> [...] 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).
When disassembling (or simulating the execution of) anything, you
usually have to specify a-priori the ISA of the binary dump. (If you
want to try auto-detection, that'd have to be done via hand-written
code in the .opc file or elsewhere.) For example, see how
disasemble_info* is passed into the generated default_print_insn()
function; or examples like sh* with its compact & media ISA's or m32rc
with its m16c/m32c.
- FChE