Fixed more VC2008 warnings - hopefully last ones

This commit is contained in:
Stanislav Shwartsman 2007-12-30 17:53:12 +00:00
parent 79fc57dec8
commit d891f0d8ec
9 changed files with 26 additions and 26 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: arith16.cc,v 1.61 2007-12-23 17:21:27 sshwarts Exp $
// $Id: arith16.cc,v 1.62 2007-12-30 17:53:12 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -538,7 +538,7 @@ void BX_CPU_C::NEG_EwM(bxInstruction_c *i)
Bit16u op1_16;
op1_16 = read_RMW_virtual_word(i->seg(), RMAddr(i));
op1_16 = (Bit16u) -op1_16;
op1_16 = - (Bit16s)(op1_16);
write_RMW_virtual_word(op1_16);
SET_FLAGS_OSZAPC_RESULT_16(op1_16, BX_INSTR_NEG16);
@ -547,7 +547,7 @@ void BX_CPU_C::NEG_EwM(bxInstruction_c *i)
void BX_CPU_C::NEG_EwR(bxInstruction_c *i)
{
Bit16u op1_16 = BX_READ_16BIT_REG(i->rm());
op1_16 = (Bit16u) -op1_16;
op1_16 = - (Bit16s)(op1_16);
BX_WRITE_16BIT_REG(i->rm(), op1_16);
SET_FLAGS_OSZAPC_RESULT_16(op1_16, BX_INSTR_NEG16);

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: arith32.cc,v 1.70 2007-12-23 17:21:27 sshwarts Exp $
// $Id: arith32.cc,v 1.71 2007-12-30 17:53:12 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -592,7 +592,7 @@ void BX_CPU_C::NEG_EdM(bxInstruction_c *i)
Bit32u op1_32;
op1_32 = read_RMW_virtual_dword(i->seg(), RMAddr(i));
op1_32 = (Bit32u) -op1_32;
op1_32 = - (Bit32s)(op1_32);
write_RMW_virtual_dword(op1_32);
SET_FLAGS_OSZAPC_RESULT_32(op1_32, BX_INSTR_NEG32);
@ -601,7 +601,7 @@ void BX_CPU_C::NEG_EdM(bxInstruction_c *i)
void BX_CPU_C::NEG_EdR(bxInstruction_c *i)
{
Bit32u op1_32 = BX_READ_32BIT_REG(i->rm());
op1_32 = (Bit32u) -op1_32;
op1_32 = - (Bit32s)(op1_32);
BX_WRITE_32BIT_REGZ(i->rm(), op1_32);
SET_FLAGS_OSZAPC_RESULT_32(op1_32, BX_INSTR_NEG32);

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: arith64.cc,v 1.46 2007-12-23 17:21:27 sshwarts Exp $
// $Id: arith64.cc,v 1.47 2007-12-30 17:53:12 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -571,7 +571,7 @@ void BX_CPU_C::NEG_EqM(bxInstruction_c *i)
/* pointer, segment address pair */
op1_64 = read_RMW_virtual_qword(i->seg(), RMAddr(i));
op1_64 = (Bit64u) -op1_64;
op1_64 = - (Bit64s)(op1_64);
write_RMW_virtual_qword(op1_64);
SET_FLAGS_OSZAPC_RESULT_64(op1_64, BX_INSTR_NEG64);
@ -580,7 +580,7 @@ void BX_CPU_C::NEG_EqM(bxInstruction_c *i)
void BX_CPU_C::NEG_EqR(bxInstruction_c *i)
{
Bit64u op1_64 = BX_READ_64BIT_REG(i->rm());
op1_64 = (Bit64u) -op1_64;
op1_64 = - (Bit64s)(op1_64);
BX_WRITE_64BIT_REG(i->rm(), op1_64);
SET_FLAGS_OSZAPC_RESULT_64(op1_64, BX_INSTR_NEG64);

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: arith8.cc,v 1.51 2007-12-20 20:58:37 sshwarts Exp $
// $Id: arith8.cc,v 1.52 2007-12-30 17:53:12 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -509,7 +509,7 @@ void BX_CPU_C::NEG_EbM(bxInstruction_c *i)
Bit8u op1_8;
op1_8 = read_RMW_virtual_byte(i->seg(), RMAddr(i));
op1_8 = -op1_8;
op1_8 = - (Bit8s)(op1_8);
write_RMW_virtual_byte(op1_8);
SET_FLAGS_OSZAPC_RESULT_8(op1_8, BX_INSTR_NEG8);
@ -518,7 +518,7 @@ void BX_CPU_C::NEG_EbM(bxInstruction_c *i)
void BX_CPU_C::NEG_EbR(bxInstruction_c *i)
{
Bit8u op1_8 = BX_READ_8BIT_REGx(i->rm(), i->extend8bitL());
op1_8 = -op1_8;
op1_8 = - (Bit8s)(op1_8);
BX_WRITE_8BIT_REGx(i->rm(), i->extend8bitL(), op1_8);
SET_FLAGS_OSZAPC_RESULT_8(op1_8, BX_INSTR_NEG8);

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: cpu.cc,v 1.195 2007-12-25 21:42:38 sshwarts Exp $
// $Id: cpu.cc,v 1.196 2007-12-30 17:53:12 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -834,8 +834,7 @@ void BX_CPU_C::prefetch(void)
bx_phy_address pAddr;
// Calculate RIP at the beginning of the page.
bx_address eipPageOffset0 = RIP - (laddr & 0xfff);
BX_CPU_THIS_PTR eipPageBias = (bx_address) -eipPageOffset0;
BX_CPU_THIS_PTR eipPageBias = PAGE_OFFSET(laddr) - RIP;
BX_CPU_THIS_PTR eipPageWindowSize = 4096;
if (! Is64BitMode()) {

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: cpu.h,v 1.404 2007-12-26 23:07:44 sshwarts Exp $
// $Id: cpu.h,v 1.405 2007-12-30 17:53:12 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -762,7 +762,8 @@ public:
unsigned os64, unsigned as64)
{
metaInfo1 = BX_SEG_REG_NULL | (os32<<3) | (as32<<4) | (os64<<5) | (as64<<6);
metaInfo2 = metaInfo3 = 0;
metaInfo2 = 0;
metaInfo3 = 0;
}
BX_CPP_INLINE unsigned seg(void) {
return metaInfo1 & 7;

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: debugstuff.cc,v 1.88 2007-12-26 23:07:44 sshwarts Exp $
// $Id: debugstuff.cc,v 1.89 2007-12-30 17:53:12 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -39,9 +39,9 @@ void BX_CPU_C::debug_disasm_instruction(bx_address offset)
bx_dbg_disassemble_current(BX_CPU_ID, 1); // only one cpu, print time stamp
#else
bx_phy_address phy_addr;
Bit8u instr_buf[16];
char char_buf[512];
unsigned i=0;
Bit8u instr_buf[16];
char char_buf[512];
size_t i=0;
static char letters[] = "0123456789ABCDEF";
static disassembler bx_disassemble;

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: mult64.cc,v 1.24 2007-12-26 23:07:44 sshwarts Exp $
// $Id: mult64.cc,v 1.25 2007-12-30 17:53:12 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -74,7 +74,7 @@ void long_mul(Bit128u *product, Bit64u op1, Bit64u op2)
void long_neg(Bit128s *n)
{
Bit64u t = n->lo;
n->lo = (Bit64u) -n->lo;
n->lo = - (Bit64s)(n->lo);
if (t - 1 > t) --n->hi;
n->hi = ~n->hi;
}

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: paging.cc,v 1.103 2007-12-26 23:07:44 sshwarts Exp $
// $Id: paging.cc,v 1.104 2007-12-30 17:53:12 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -1041,7 +1041,7 @@ bx_phy_address BX_CPU_C::translate_linear(bx_address laddr, unsigned curr_pl, un
bx_bool BX_CPU_C::dbg_xlate_linear2phy(bx_address laddr, bx_phy_address *phy)
{
if (BX_CPU_THIS_PTR cr0.get_PG() == 0) {
*phy = laddr;
*phy = (bx_phy_address) laddr;
return 1;
}
@ -1077,7 +1077,7 @@ bx_bool BX_CPU_C::dbg_xlate_linear2phy(bx_address laddr, bx_phy_address *phy)
BX_CPU_THIS_PTR mem->readPhysicalPage(BX_CPU_THIS, pt_address, 8, &pte);
if (!(pte & 1))
goto page_fault;
pt_address = pte & BX_CONST64(0x000ffffffffff000);
pt_address = (bx_phy_address)(pte & BX_CONST64(0x000ffffffffff000));
if (level == 1 && (pte & 0x80)) { // PSE page
offset_mask = 0x1fffff;
break;