qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fabrice Bellard <fabrice@bellard.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [4583] jump simplification
Date: Sun, 25 May 2008 18:49:07 +0000	[thread overview]
Message-ID: <E1K0LHH-0002fJ-BM@cvs.savannah.gnu.org> (raw)

Revision: 4583
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4583
Author:   bellard
Date:     2008-05-25 18:49:06 +0000 (Sun, 25 May 2008)

Log Message:
-----------
jump simplification

Modified Paths:
--------------
    trunk/tcg/x86_64/tcg-target.c

Modified: trunk/tcg/x86_64/tcg-target.c
===================================================================
--- trunk/tcg/x86_64/tcg-target.c	2008-05-25 18:41:58 UTC (rev 4582)
+++ trunk/tcg/x86_64/tcg-target.c	2008-05-25 18:49:06 UTC (rev 4583)
@@ -450,41 +450,20 @@
                            TCGArg arg1, TCGArg arg2, int const_arg2,
                            int label_index, int rexw)
 {
-    int c;
     if (const_arg2) {
         if (arg2 == 0) {
-            /* use test */
-            switch(cond) {
-            case TCG_COND_EQ:
-                c = JCC_JE;
-                break;
-            case TCG_COND_NE:
-                c = JCC_JNE;
-                break;
-            case TCG_COND_LT:
-                c = JCC_JS;
-                break;
-            case TCG_COND_GE:
-                c = JCC_JNS;
-                break;
-            default:
-                goto do_cmpi;
-            }
             /* test r, r */
             tcg_out_modrm(s, 0x85 | rexw, arg1, arg1);
-            tcg_out_jxx(s, c, label_index);
         } else {
-        do_cmpi:
             if (rexw)
                 tgen_arithi64(s, ARITH_CMP, arg1, arg2);
             else
                 tgen_arithi32(s, ARITH_CMP, arg1, arg2);
-            tcg_out_jxx(s, tcg_cond_to_jcc[cond], label_index);
         }
     } else {
         tcg_out_modrm(s, 0x01 | (ARITH_CMP << 3) | rexw, arg2, arg1);
-        tcg_out_jxx(s, tcg_cond_to_jcc[cond], label_index);
     }
+    tcg_out_jxx(s, tcg_cond_to_jcc[cond], label_index);
 }
 
 #if defined(CONFIG_SOFTMMU)

                 reply	other threads:[~2008-05-25 18:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=E1K0LHH-0002fJ-BM@cvs.savannah.gnu.org \
    --to=fabrice@bellard.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).