From 79b811f23f3ba246a636f5b47b491b2c69670ba2 Mon Sep 17 00:00:00 2001 From: Volker Ruppert Date: Fri, 2 May 2003 12:22:48 +0000 Subject: [PATCH] - fixed warnings in these files: cpu/fetchdecode.cc cpu/mmx.cc cpu/proc_ctrl.cc iodev/virt_timer.cc plugin.cc --- bochs/cpu/fetchdecode.cc | 4 ++-- bochs/cpu/mmx.cc | 4 +++- bochs/cpu/proc_ctrl.cc | 7 +++++-- bochs/iodev/virt_timer.cc | 2 +- bochs/plugin.cc | 4 +++- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/bochs/cpu/fetchdecode.cc b/bochs/cpu/fetchdecode.cc index 24697f9da..a6246852c 100644 --- a/bochs/cpu/fetchdecode.cc +++ b/bochs/cpu/fetchdecode.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: fetchdecode.cc,v 1.49 2003-04-23 17:52:58 sshwarts Exp $ +// $Id: fetchdecode.cc,v 1.50 2003-05-02 12:22:47 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -2380,7 +2380,7 @@ BX_CPU_C::fetchDecode(Bit8u *iptr, bxInstruction_c *instruction, bx_bool is_32, lock=0; unsigned b1, b2, ilen=1, attr, os_32; unsigned imm_mode, offset; - unsigned rm, mod, nnn; + unsigned rm, mod=0, nnn=0; unsigned sse_prefix; #define SSE_PREFIX_NONE 0 #define SSE_PREFIX_66 1 diff --git a/bochs/cpu/mmx.cc b/bochs/cpu/mmx.cc index 55d19fd20..e130fd4e8 100644 --- a/bochs/cpu/mmx.cc +++ b/bochs/cpu/mmx.cc @@ -81,16 +81,18 @@ Bit16u BX_CPP_AttrRegparmN(1) SaturateDwordSToWordU(Bit32s value) return value; } +#if BX_SUPPORT_SSE >= 1 static Bit16u SelectMmxWord(BxPackedMmxRegister mmx, unsigned index) { return (MMXUQ(mmx) >> ((index & 0x3) * 16)) & 0xffff; } +#endif void BX_CPU_C::printMmxRegisters(void) { for(int i=0;i<8;i++) { BxPackedMmxRegister mm = BX_READ_MMX_REG(i); - fprintf(stderr, "MM%d: %lx%lx\n", i, MMXUD1(mm), MMXUD0(mm)); + fprintf(stderr, "MM%d: %08x%08x\n", i, MMXUD1(mm), MMXUD0(mm)); } } diff --git a/bochs/cpu/proc_ctrl.cc b/bochs/cpu/proc_ctrl.cc index 65492a1a6..14060f5c9 100644 --- a/bochs/cpu/proc_ctrl.cc +++ b/bochs/cpu/proc_ctrl.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: proc_ctrl.cc,v 1.68 2003-02-13 15:04:07 sshwarts Exp $ +// $Id: proc_ctrl.cc,v 1.69 2003-05-02 12:22:48 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -1428,7 +1428,10 @@ get_std_cpuid_features() BX_CPU_C::CPUID(bxInstruction_c *i) { #if BX_CPU_LEVEL >= 4 - unsigned family, model, stepping, features; + unsigned family, model, stepping; +#if BX_SUPPORT_X86_64 + unsigned features; +#endif #endif invalidate_prefetch_q(); diff --git a/bochs/iodev/virt_timer.cc b/bochs/iodev/virt_timer.cc index dcb15fe5d..d55071e16 100644 --- a/bochs/iodev/virt_timer.cc +++ b/bochs/iodev/virt_timer.cc @@ -340,7 +340,7 @@ bx_virt_timer_c::init(void) { total_real_usec=0; last_realtime_delta=0; //System time variables: - last_usec; + last_usec = 0 ; usec_per_second = USEC_PER_SECOND; stored_delta=0; last_system_usec=0; diff --git a/bochs/plugin.cc b/bochs/plugin.cc index 1cde12b0d..005e44d84 100644 --- a/bochs/plugin.cc +++ b/bochs/plugin.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: plugin.cc,v 1.5 2002-11-14 18:45:41 bdenney Exp $ +// $Id: plugin.cc,v 1.6 2003-05-02 12:22:45 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // This file defines the plugin and plugin-device registration functions and @@ -54,7 +54,9 @@ void (*pluginHRQHackCallback)(void); unsigned pluginHRQ = 0; plugin_t *plugins = NULL; /* Head of the linked list of plugins */ +#if BX_PLUGINS static void plugin_init_one(plugin_t *plugin); +#endif device_t *devices = NULL; /* Head of the linked list of registered devices */