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] [4510] converted INTO/CMPXCHG8B to TCG
Date: Wed, 21 May 2008 13:29:47 +0000	[thread overview]
Message-ID: <E1JyoO3-00059f-F6@cvs.savannah.gnu.org> (raw)

Revision: 4510
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4510
Author:   bellard
Date:     2008-05-21 13:29:45 +0000 (Wed, 21 May 2008)

Log Message:
-----------
converted INTO/CMPXCHG8B to TCG

Modified Paths:
--------------
    trunk/target-i386/helper.c
    trunk/target-i386/helper.h
    trunk/target-i386/op.c
    trunk/target-i386/translate.c

Modified: trunk/target-i386/helper.c
===================================================================
--- trunk/target-i386/helper.c	2008-05-21 13:24:30 UTC (rev 4509)
+++ trunk/target-i386/helper.c	2008-05-21 13:29:45 UTC (rev 4510)
@@ -1849,6 +1849,15 @@
     FORCE_RET();
 }
 
+void helper_into(int next_eip_addend)
+{
+    int eflags;
+    eflags = cc_table[CC_OP].compute_all();
+    if (eflags & CC_O) {
+        raise_interrupt(EXCP04_INTO, 1, 0, next_eip_addend);
+    }
+}
+
 void helper_cmpxchg8b(target_ulong a0)
 {
     uint64_t d;

Modified: trunk/target-i386/helper.h
===================================================================
--- trunk/target-i386/helper.h	2008-05-21 13:24:30 UTC (rev 4509)
+++ trunk/target-i386/helper.h	2008-05-21 13:29:45 UTC (rev 4510)
@@ -71,6 +71,7 @@
 void helper_boundw(target_ulong a0, int v);
 void helper_boundl(target_ulong a0, int v);
 void helper_rsm(void);
+void helper_into(int next_eip_addend);
 void helper_cmpxchg8b(target_ulong a0);
 void helper_single_step(void);
 void helper_cpuid(void);

Modified: trunk/target-i386/op.c
===================================================================
--- trunk/target-i386/op.c	2008-05-21 13:24:30 UTC (rev 4509)
+++ trunk/target-i386/op.c	2008-05-21 13:29:45 UTC (rev 4510)
@@ -123,24 +123,6 @@
 
 #endif
 
-/* constant load & misc op */
-
-/* XXX: consistent names */
-void OPPROTO op_into(void)
-{
-    int eflags;
-    eflags = cc_table[CC_OP].compute_all();
-    if (eflags & CC_O) {
-        raise_interrupt(EXCP04_INTO, 1, 0, PARAM1);
-    }
-    FORCE_RET();
-}
-
-void OPPROTO op_cmpxchg8b(void)
-{
-    helper_cmpxchg8b(A0);
-}
-
 /* multiple size ops */
 
 #define ldul ldl

Modified: trunk/target-i386/translate.c
===================================================================
--- trunk/target-i386/translate.c	2008-05-21 13:24:30 UTC (rev 4509)
+++ trunk/target-i386/translate.c	2008-05-21 13:29:45 UTC (rev 4510)
@@ -4308,7 +4308,7 @@
         if (s->cc_op != CC_OP_DYNAMIC)
             gen_op_set_cc_op(s->cc_op);
         gen_lea_modrm(s, modrm, &reg_addr, &offset_addr);
-        gen_op_cmpxchg8b();
+        tcg_gen_helper_0_1(helper_cmpxchg8b, cpu_A0);
         s->cc_op = CC_OP_EFLAGS;
         break;
 
@@ -6016,7 +6016,7 @@
         if (s->cc_op != CC_OP_DYNAMIC)
             gen_op_set_cc_op(s->cc_op);
         gen_jmp_im(pc_start - s->cs_base);
-        gen_op_into(s->pc - pc_start);
+        tcg_gen_helper_0_1(helper_into, tcg_const_i32(s->pc - pc_start));
         break;
     case 0xf1: /* icebp (undocumented, exits to external debugger) */
         if (gen_svm_check_intercept(s, pc_start, SVM_EXIT_ICEBP))

                 reply	other threads:[~2008-05-21 13:29 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=E1JyoO3-00059f-F6@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).