qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Zhihui Zhang <zzhsuny@gmail.com>
To: qemu-devel@nongnu.org
Cc: blauwirbel@gmail.com, rth@twiddle.net
Subject: [Qemu-devel] [PATCH] Switch the roles of jmp_next[0] and jmp_next[1].
Date: Sat, 22 Jun 2013 12:10:36 -0400	[thread overview]
Message-ID: <1371917436-5008-1-git-send-email-zzhsuny@gmail.com> (raw)

This way, jmp_next[0] means "taken" for both conditional jumps AND unconditional jumps.
Currently, it has opposite meanings for the two cases.

Signed-off-by: Zhihui Zhang <zzhsuny@gmail.com>
---
 target-i386/translate.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target-i386/translate.c b/target-i386/translate.c
index 14b0298..7daa1a1 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -2430,10 +2430,10 @@ static inline void gen_jcc(DisasContext *s, int b,
         l1 = gen_new_label();
         gen_jcc1(s, b, l1);
 
-        gen_goto_tb(s, 0, next_eip);
+        gen_goto_tb(s, 1, next_eip);
 
         gen_set_label(l1);
-        gen_goto_tb(s, 1, val);
+        gen_goto_tb(s, 0, val);
         s->is_jmp = DISAS_TB_JUMP;
     } else {
         l1 = gen_new_label();
-- 
1.8.1.2

             reply	other threads:[~2013-06-22 16:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-22 16:10 Zhihui Zhang [this message]
2013-06-22 22:04 ` [Qemu-devel] [PATCH] Switch the roles of jmp_next[0] and jmp_next[1] Peter Maydell
2013-06-23 18:22 ` Richard Henderson
2013-06-24  2:52   ` Zhihui Zhang

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=1371917436-5008-1-git-send-email-zzhsuny@gmail.com \
    --to=zzhsuny@gmail.com \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).