qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [RFC PATCH 09/10] i386: move TCG functions out of helper.o, non-TCG functions to cpu.o
Date: Mon, 17 Sep 2012 18:00:48 +0200	[thread overview]
Message-ID: <1347897649-23236-10-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1347897649-23236-1-git-send-email-pbonzini@redhat.com>

This lets non-TCG build remove *_helper.c from the build.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target-i386/cpu.c         | 18 ++++++++++++++++++
 target-i386/excp_helper.c | 24 ++++++++++++++++++++++++
 target-i386/fpu_helper.c  | 18 ------------------
 target-i386/helper.c      | 24 ------------------------
 4 file modificati, 42 inserzioni(+), 42 rimozioni(-)

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 423e009..e0f0b57 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1831,6 +1831,24 @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
     cc->reset = x86_cpu_reset;
 }
 
+void cpu_get_fp80(uint64_t *pmant, uint16_t *pexp, floatx80 f)
+{
+    CPU_LDoubleU temp;
+
+    temp.d = f;
+    *pmant = temp.l.lower;
+    *pexp = temp.l.upper;
+}
+
+floatx80 cpu_set_fp80(uint64_t mant, uint16_t upper)
+{
+    CPU_LDoubleU temp;
+
+    temp.l.upper = upper;
+    temp.l.lower = mant;
+    return temp.d;
+}
+
 static const TypeInfo x86_cpu_type_info = {
     .name = TYPE_X86_CPU,
     .parent = TYPE_CPU,
diff --git a/target-i386/excp_helper.c b/target-i386/excp_helper.c
index aaa5ca2..391f115 100644
--- a/target-i386/excp_helper.c
+++ b/target-i386/excp_helper.c
@@ -40,6 +40,30 @@ void helper_raise_exception(CPUX86State *env, int exception_index)
     raise_exception(env, exception_index);
 }
 
+void breakpoint_handler(CPUX86State *env)
+{
+    CPUBreakpoint *bp;
+
+    if (env->watchpoint_hit) {
+        if (env->watchpoint_hit->flags & BP_CPU) {
+            env->watchpoint_hit = NULL;
+            if (check_hw_breakpoints(env, 0))
+                raise_exception(env, EXCP01_DB);
+            else
+                cpu_resume_from_signal(env, NULL);
+        }
+    } else {
+        QTAILQ_FOREACH(bp, &env->breakpoints, entry)
+            if (bp->pc == env->eip) {
+                if (bp->flags & BP_CPU) {
+                    check_hw_breakpoints(env, 1);
+                    raise_exception(env, EXCP01_DB);
+                }
+                break;
+            }
+    }
+}
+
 /*
  * Check nested exceptions and change to double or triple fault if
  * needed. It should only be called, if this is not an interrupt.
diff --git a/target-i386/fpu_helper.c b/target-i386/fpu_helper.c
index dfc34a6..7747236 100644
--- a/target-i386/fpu_helper.c
+++ b/target-i386/fpu_helper.c
@@ -1198,24 +1198,6 @@ void helper_fxrstor(CPUX86State *env, target_ulong ptr, int data64)
     }
 }
 
-void cpu_get_fp80(uint64_t *pmant, uint16_t *pexp, floatx80 f)
-{
-    CPU_LDoubleU temp;
-
-    temp.d = f;
-    *pmant = temp.l.lower;
-    *pexp = temp.l.upper;
-}
-
-floatx80 cpu_set_fp80(uint64_t mant, uint16_t upper)
-{
-    CPU_LDoubleU temp;
-
-    temp.l.upper = upper;
-    temp.l.lower = mant;
-    return temp.d;
-}
-
 /* MMX/SSE */
 /* XXX: optimize by storing fptt and fptags in the static cpu state */
 
diff --git a/target-i386/helper.c b/target-i386/helper.c
index 8a5da3d..cfc7f1a 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -941,30 +941,6 @@ int check_hw_breakpoints(CPUX86State *env, int force_dr6_update)
     return hit_enabled;
 }
 
-void breakpoint_handler(CPUX86State *env)
-{
-    CPUBreakpoint *bp;
-
-    if (env->watchpoint_hit) {
-        if (env->watchpoint_hit->flags & BP_CPU) {
-            env->watchpoint_hit = NULL;
-            if (check_hw_breakpoints(env, 0))
-                raise_exception(env, EXCP01_DB);
-            else
-                cpu_resume_from_signal(env, NULL);
-        }
-    } else {
-        QTAILQ_FOREACH(bp, &env->breakpoints, entry)
-            if (bp->pc == env->eip) {
-                if (bp->flags & BP_CPU) {
-                    check_hw_breakpoints(env, 1);
-                    raise_exception(env, EXCP01_DB);
-                }
-                break;
-            }
-    }
-}
-
 typedef struct MCEInjectionParams {
     Monitor *mon;
     CPUX86State *env;
-- 
1.7.12

  parent reply	other threads:[~2012-09-17 16:01 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-17 16:00 [Qemu-devel] [RFC PATCH 00/10] Add --disable-tcg Paolo Bonzini
2012-09-17 16:00 ` [Qemu-devel] [RFC PATCH 01/10] configure: factor out list of supported Xen/KVM targets Paolo Bonzini
2012-09-17 17:02   ` Peter Maydell
2012-09-17 17:09     ` Paolo Bonzini
2012-09-17 17:13       ` Peter Maydell
2012-09-17 18:21       ` Stefano Stabellini
2012-09-17 18:30     ` Stefano Stabellini
2012-09-17 18:53       ` Stefano Stabellini
2012-09-17 19:15         ` Peter Maydell
2012-09-17 16:00 ` [Qemu-devel] [RFC PATCH 02/10] configure: add CONFIG_TCG=y to config-host.mak Paolo Bonzini
2012-09-17 16:00 ` [Qemu-devel] [RFC PATCH 03/10] vl: implement tcg_enabled() and tcg_available() as for other accelerators Paolo Bonzini
2012-09-17 16:00 ` [Qemu-devel] [RFC PATCH 04/10] tcg: change cpu_restore_state to return void Paolo Bonzini
2012-09-17 17:06   ` Peter Maydell
2012-09-17 17:09     ` Paolo Bonzini
2012-09-17 17:20       ` Peter Maydell
2012-09-17 18:25         ` Paolo Bonzini
2012-09-17 18:57           ` Peter Maydell
2012-09-17 16:00 ` [Qemu-devel] [RFC PATCH 05/10] exec: small adjustments for TCG separation Paolo Bonzini
2012-09-17 19:17   ` Blue Swirl
2012-09-17 21:47     ` Richard Henderson
2012-09-17 16:00 ` [Qemu-devel] [RFC PATCH 06/10] monitor: disable info jit if !TCG Paolo Bonzini
2012-09-17 16:00 ` [Qemu-devel] [RFC PATCH 07/10] configure: emit summary at the very end Paolo Bonzini
2012-09-17 16:00 ` [Qemu-devel] [RFC PATCH 08/10] configure: add --disable-tcg configure option Paolo Bonzini
2012-09-17 16:00 ` Paolo Bonzini [this message]
2012-09-17 17:12   ` [Qemu-devel] [RFC PATCH 09/10] i386: move TCG functions out of helper.o, non-TCG functions to cpu.o Peter Maydell
2012-09-17 18:39     ` Paolo Bonzini
2012-09-17 19:15   ` Blue Swirl
2012-09-17 16:00 ` [Qemu-devel] [RFC PATCH 10/10] build: do not build TCG files if TCG is disabled Paolo Bonzini
2012-09-17 19:20 ` [Qemu-devel] [RFC PATCH 00/10] Add --disable-tcg Blue Swirl

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=1347897649-23236-10-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --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).