From 574b69c81eed49fca7851e2b6025889520455b98 Mon Sep 17 00:00:00 2001 From: Stanislav Shwartsman Date: Tue, 27 Nov 2012 15:40:45 +0000 Subject: [PATCH] fixed MSDEV warnings --- bochs/cpu/cpu.cc | 2 +- bochs/cpu/cpu.h | 2 +- bochs/cpu/fpu/softfloat-muladd.cc | 2 +- bochs/cpu/instr.h | 2 +- bochs/cpu/paging.cc | 2 +- bochs/cpu/simd_int.h | 2 +- bochs/cpu/stack.cc | 2 +- bochs/cpu/vmcs.cc | 2 +- bochs/cpu/vmx.h | 2 +- bochs/gui/win32.cc | 12 ++++++------ 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/bochs/cpu/cpu.cc b/bochs/cpu/cpu.cc index 5ae1c8bb2..bbd99b8ee 100644 --- a/bochs/cpu/cpu.cc +++ b/bochs/cpu/cpu.cc @@ -248,7 +248,7 @@ BX_INSF_TYPE BX_CPP_AttrRegparmN(1) BX_CPU_C::linkTrace(bxInstruction_c *i) if (BX_CPU_THIS_PTR async_event) return; - Bit32u delta = BX_CPU_THIS_PTR icount - BX_CPU_THIS_PTR icount_last_sync; + Bit32u delta = (Bit32u) (BX_CPU_THIS_PTR icount - BX_CPU_THIS_PTR icount_last_sync); if(delta >= bx_pc_system.getNumCpuTicksLeftNextEvent()) return; diff --git a/bochs/cpu/cpu.h b/bochs/cpu/cpu.h index 4311f4d4c..b045e23b1 100644 --- a/bochs/cpu/cpu.h +++ b/bochs/cpu/cpu.h @@ -893,7 +893,7 @@ struct monitor_addr_t { }; #endif -class BX_SMM_State; +struct BX_SMM_State; class BOCHSAPI BX_CPU_C : public logfunctions { diff --git a/bochs/cpu/fpu/softfloat-muladd.cc b/bochs/cpu/fpu/softfloat-muladd.cc index 1aa187586..6a2ee3937 100755 --- a/bochs/cpu/fpu/softfloat-muladd.cc +++ b/bochs/cpu/fpu/softfloat-muladd.cc @@ -266,7 +266,7 @@ float32 float32_muladd(float32 a, float32 b, float32 c, int flags, float_status_ if (cExp == 0) { if (!cSig) { /* Throw out the special case of c being an exact zero now */ - pSig = shift64RightJamming(pSig64, 32); + pSig = (Bit32u) shift64RightJamming(pSig64, 32); return roundAndPackFloat32(zSign, pExp - 1, pSig, status); } float_raise(status, float_flag_denormal); diff --git a/bochs/cpu/instr.h b/bochs/cpu/instr.h index bdcbae4a8..b692bc2a4 100644 --- a/bochs/cpu/instr.h +++ b/bochs/cpu/instr.h @@ -32,7 +32,7 @@ typedef void BX_INSF_TYPE; #define BX_SYNC_TIME_IF_SINGLE_PROCESSOR(allowed_delta) { \ if (BX_SMP_PROCESSORS == 1) { \ - Bit32u delta = BX_CPU_THIS_PTR icount - BX_CPU_THIS_PTR icount_last_sync; \ + Bit32u delta = (Bit32u)(BX_CPU_THIS_PTR icount - BX_CPU_THIS_PTR icount_last_sync); \ if (delta >= allowed_delta) { \ BX_CPU_THIS_PTR sync_icount(); \ BX_TICKN(delta); \ diff --git a/bochs/cpu/paging.cc b/bochs/cpu/paging.cc index 9dc08fd8d..c5909dfc7 100644 --- a/bochs/cpu/paging.cc +++ b/bochs/cpu/paging.cc @@ -729,7 +729,7 @@ bx_phy_address BX_CPU_C::translate_linear_long_mode(bx_address laddr, Bit32u &lp page_fault(ERROR_RESERVED | ERROR_PROTECTION, laddr, user, rw); } - lpf_mask = offset_mask; + lpf_mask = (Bit32u) offset_mask; break; } } diff --git a/bochs/cpu/simd_int.h b/bochs/cpu/simd_int.h index 0915b6218..e4ebf1907 100644 --- a/bochs/cpu/simd_int.h +++ b/bochs/cpu/simd_int.h @@ -826,7 +826,7 @@ BX_CPP_INLINE void sse_pbroadcastb(BxPackedXmmRegister *op, Bit8u val_8) } } -BX_CPP_INLINE void sse_pbroadcastw(BxPackedXmmRegister *op, Bit8u val_16) +BX_CPP_INLINE void sse_pbroadcastw(BxPackedXmmRegister *op, Bit16u val_16) { for(unsigned n=0; n<8; n++) { op->xmm16u(n) = val_16; diff --git a/bochs/cpu/stack.cc b/bochs/cpu/stack.cc index b8e940368..afd6d8986 100755 --- a/bochs/cpu/stack.cc +++ b/bochs/cpu/stack.cc @@ -57,7 +57,7 @@ void BX_CPP_AttrRegparmN(2) BX_CPU_C::stackPrefetch(bx_address offset, unsigned return; Bit32u limit = BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS].cache.u.segment.limit_scaled; - Bit32u pageStart = offset - pageOffset; + Bit32u pageStart = (Bit32u) offset - pageOffset; if (! BX_CPU_THIS_PTR sregs[BX_SEG_REG_SS].cache.valid) { BX_ERROR(("stackPrefetch: SS not valid")); diff --git a/bochs/cpu/vmcs.cc b/bochs/cpu/vmcs.cc index aaef64fe1..bb2b1f98e 100644 --- a/bochs/cpu/vmcs.cc +++ b/bochs/cpu/vmcs.cc @@ -259,7 +259,7 @@ bx_bool BX_CPU_C::vmcs_field_supported(Bit32u encoding) case VMCS_64BIT_CONTROL_VMFUNC_CTRLS: case VMCS_64BIT_CONTROL_VMFUNC_CTRLS_HI: - return BX_CPU_THIS_PTR vmx_cap.vmx_vmfunc_supported_bits; + return BX_CPU_THIS_PTR vmx_cap.vmx_vmfunc_supported_bits != 0; case VMCS_64BIT_CONTROL_EPTP_LIST_ADDRESS: case VMCS_64BIT_CONTROL_EPTP_LIST_ADDRESS_HI: diff --git a/bochs/cpu/vmx.h b/bochs/cpu/vmx.h index a9a86b6e0..47f25d4ae 100644 --- a/bochs/cpu/vmx.h +++ b/bochs/cpu/vmx.h @@ -652,7 +652,7 @@ typedef struct bx_VMCS Bit32u pause_loop_exiting_gap; Bit32u pause_loop_exiting_window; Bit64u last_pause_time; - Bit32u first_pause_time; + Bit64u first_pause_time; #endif #if BX_SUPPORT_VMX >= 2 diff --git a/bochs/gui/win32.cc b/bochs/gui/win32.cc index dcfd0ead8..15af5d99e 100644 --- a/bochs/gui/win32.cc +++ b/bochs/gui/win32.cc @@ -1142,7 +1142,7 @@ LRESULT CALLBACK simWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) case WM_MOUSEMOVE: if (!mouseModeChange) { - processMouseXY(LOWORD(lParam), HIWORD(lParam), 0, wParam, 0); + processMouseXY(LOWORD(lParam), HIWORD(lParam), 0, (int) wParam, 0); } return 0; @@ -1172,11 +1172,11 @@ LRESULT CALLBACK simWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) bx_gui->mouse_toggle_check(BX_MT_LBUTTON, 0); mouseModeChange = FALSE; } else { - processMouseXY(LOWORD(lParam), HIWORD(lParam), 0, wParam, 1); + processMouseXY(LOWORD(lParam), HIWORD(lParam), 0, (int) wParam, 1); } return 0; } - processMouseXY(LOWORD(lParam), HIWORD(lParam), 0, wParam, 1); + processMouseXY(LOWORD(lParam), HIWORD(lParam), 0, (int) wParam, 1); return 0; case WM_MBUTTONDOWN: @@ -1192,7 +1192,7 @@ LRESULT CALLBACK simWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) bx_gui->mouse_toggle_check(BX_MT_MBUTTON, 0); mouseModeChange = FALSE; } else { - processMouseXY(LOWORD(lParam), HIWORD(lParam), 0, wParam, 4); + processMouseXY(LOWORD(lParam), HIWORD(lParam), 0, (int) wParam, 4); } return 0; @@ -1210,11 +1210,11 @@ LRESULT CALLBACK simWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) bx_gui->mouse_toggle_check(BX_MT_RBUTTON, 0); mouseModeChange = FALSE; } else { - processMouseXY(LOWORD(lParam), HIWORD(lParam), 0, wParam, 2); + processMouseXY(LOWORD(lParam), HIWORD(lParam), 0, (int) wParam, 2); } return 0; } - processMouseXY(LOWORD(lParam), HIWORD(lParam), 0, wParam, 2); + processMouseXY(LOWORD(lParam), HIWORD(lParam), 0, (int) wParam, 2); return 0; case WM_CLOSE: