From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDdlO-0003gs-3C for qemu-devel@nongnu.org; Mon, 17 Sep 2012 12:01:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDdlI-0000dL-3A for qemu-devel@nongnu.org; Mon, 17 Sep 2012 12:01:34 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:54240) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDdlH-0000Hr-Ti for qemu-devel@nongnu.org; Mon, 17 Sep 2012 12:01:28 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp12so9799681pbb.4 for ; Mon, 17 Sep 2012 09:01:27 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Mon, 17 Sep 2012 18:00:48 +0200 Message-Id: <1347897649-23236-10-git-send-email-pbonzini@redhat.com> In-Reply-To: <1347897649-23236-1-git-send-email-pbonzini@redhat.com> References: <1347897649-23236-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [RFC PATCH 09/10] i386: move TCG functions out of helper.o, non-TCG functions to cpu.o List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This lets non-TCG build remove *_helper.c from the build. Signed-off-by: Paolo Bonzini --- 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