From: Mike Frysinger <vapier@gentoo.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] qemu branching internal questions
Date: Tue, 4 Jan 2011 14:43:11 -0500 [thread overview]
Message-ID: <AANLkTi=VQQmdE8-Hm9sbKFozPSe6YG_rDK95Qp_mMaU6@mail.gmail.com> (raw)
i've been working on a new architecture port, but i cant quite figure
out some of the intricacies from reading the code. i have all the
simple stuff working for linux-user (register moves, immediate moves,
loads, stores, syscall emulation) and want to move on to the next big
piece -- code flow changes.
i cant quite figure out the difference between DISAS_TB_JUMP and
DISAS_JUMP. the exec-all.h header says one is for "only pc was
modified dynamically" while the other is "only pc was modified
statically". is this referring to conditional vs unconditional jumps
? or is this referring to direct vs indirect jumps ?
conditional: if cc jump 1f;
unconditional: jump 1f;
direct: jump foo;
indirect: P0 = [SP++]; jump (P0);
along these lines, when should i be using gen_new_label,
gen_set_label, tcg_gen_brcond*, and tcg_gen_setcond* ? should they
only be used with conditional code ? or should unconditional jumps be
generating labels too ?
for conditional register assignments, i think i should be using these
too. so something like:
if CC R0 = R1;
should turn into:
l = gen_new_label();
tcg_gen_brcondi_tl(TCG_COND_NE, cpu_cc, T, l);
tcg_gen_mov_tl(reg_dst, reg_src);
gen_set_label(l);
and i dont need to flag this bit of code as a jump (e.g. DISAS_JUMP) ...
also, having gone through the ops already available in tcg-op.h, ive
managed to decode what they do except for these:
tcg_gen_{ld,st}{8,16,32}{u,s}
i thought originally they were for handling load/store insns, but they
didnt work for me, and then i found the tcg_gen_qemu_{ld,st}* ops. so
what is the point of these ones ?
-mike
next reply other threads:[~2011-01-04 19:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-04 19:43 Mike Frysinger [this message]
2011-01-05 10:59 ` [Qemu-devel] qemu branching internal questions Edgar E. Iglesias
2011-01-06 18:47 ` Mike Frysinger
2011-01-07 2:04 ` Edgar E. Iglesias
2011-01-07 3:05 ` Mike Frysinger
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='AANLkTi=VQQmdE8-Hm9sbKFozPSe6YG_rDK95Qp_mMaU6@mail.gmail.com' \
--to=vapier@gentoo.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).