Fixes for compilation by Visual Studio 2008
This commit is contained in:
parent
455e7730f0
commit
4fc66aab31
@ -16,7 +16,6 @@ set echo
|
||||
--enable-show-ips \
|
||||
--disable-readline \
|
||||
--without-x \
|
||||
--enable-cpp \
|
||||
--with-win32 --with-rfb --with-nogui
|
||||
|
||||
unset echo
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: dbg_main.cc,v 1.184 2009-04-05 19:09:43 sshwarts Exp $
|
||||
// $Id: dbg_main.cc,v 1.185 2009-04-07 16:12:19 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -72,7 +72,7 @@ static struct {
|
||||
unsigned disassemble_size;
|
||||
char default_display_format;
|
||||
char default_unit_size;
|
||||
Bit32u default_addr;
|
||||
bx_address default_addr;
|
||||
unsigned next_bpoint_id;
|
||||
unsigned next_wpoint_id;
|
||||
} bx_debugger;
|
||||
@ -1164,7 +1164,7 @@ void bx_dbg_where_command()
|
||||
return;
|
||||
}
|
||||
Bit32u bp = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_EBP);
|
||||
Bit32u ip = BX_CPU(dbg_cpu)->get_instruction_pointer();
|
||||
bx_address ip = BX_CPU(dbg_cpu)->get_instruction_pointer();
|
||||
dbg_printf("(%d) 0x%08x\n", 0, ip);
|
||||
for (int i = 1; i < 50; i++) {
|
||||
// Up
|
||||
@ -1399,7 +1399,7 @@ void bx_dbg_show_param_command(char *param)
|
||||
int bx_dbg_show_symbolic(void)
|
||||
{
|
||||
static unsigned last_cpu_mode = 0;
|
||||
static bx_phy_address last_cr3 = 0;
|
||||
static bx_address last_cr3 = 0;
|
||||
|
||||
/* modes & address spaces */
|
||||
if (dbg_show_mask & BX_DBG_SHOW_MODE) {
|
||||
@ -2423,7 +2423,7 @@ void bx_dbg_examine_command(char *command, char *format, bx_bool format_passed,
|
||||
}
|
||||
else {
|
||||
// address is already physical address
|
||||
BX_MEM(0)->dbg_fetch_mem(BX_CPU(dbg_cpu), addr, data_size, databuf);
|
||||
BX_MEM(0)->dbg_fetch_mem(BX_CPU(dbg_cpu), (bx_phy_address) addr, data_size, databuf);
|
||||
}
|
||||
|
||||
//FIXME HanishKVC The char display for data to be properly integrated
|
||||
@ -2667,7 +2667,7 @@ void bx_dbg_disassemble_command(const char *format, Bit64u from, Bit64u to)
|
||||
int numlines = INT_MAX;
|
||||
|
||||
if (from > to) {
|
||||
int temp = from;
|
||||
Bit64u temp = from;
|
||||
from = to;
|
||||
to = temp;
|
||||
}
|
||||
@ -3139,7 +3139,7 @@ void bx_dbg_info_ivt_command(unsigned from, unsigned to)
|
||||
|
||||
for (unsigned i = from; i <= to; i++)
|
||||
{
|
||||
BX_MEM(0)->dbg_fetch_mem(BX_CPU(dbg_cpu), idtr.base + i * 4, sizeof(buff), buff);
|
||||
BX_MEM(0)->dbg_fetch_mem(BX_CPU(dbg_cpu), (bx_phy_address)(idtr.base + i*4), sizeof(buff), buff);
|
||||
#ifdef BX_LITTLE_ENDIAN
|
||||
seg = *(Bit16u*)(&buff[2]);
|
||||
off = *(Bit16u*)(&buff[0]);
|
||||
@ -3583,9 +3583,9 @@ bx_address bx_dbg_get_instruction_pointer(void)
|
||||
return BX_CPU(dbg_cpu)->get_instruction_pointer();
|
||||
}
|
||||
|
||||
Bit32u bx_dbg_get_laddr(Bit16u sel, Bit32u ofs)
|
||||
bx_address bx_dbg_get_laddr(Bit16u sel, bx_address ofs)
|
||||
{
|
||||
Bit32u laddr;
|
||||
bx_address laddr;
|
||||
|
||||
if (BX_CPU(dbg_cpu)->protected_mode()) {
|
||||
bx_descriptor_t descriptor;
|
||||
@ -3601,7 +3601,7 @@ Bit32u bx_dbg_get_laddr(Bit16u sel, Bit32u ofs)
|
||||
/* parse fields in selector */
|
||||
BX_CPU(dbg_cpu)->parse_selector(sel, &selector);
|
||||
|
||||
Bit32u desc_base;
|
||||
bx_address desc_base;
|
||||
if (selector.ti) {
|
||||
// LDT
|
||||
if (((Bit32u)selector.index*8 + 7) > BX_CPU(dbg_cpu)->ldtr.cache.u.segment.limit_scaled) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: debug.h,v 1.51 2009-04-03 17:36:24 sshwarts Exp $
|
||||
// $Id: debug.h,v 1.52 2009-04-07 16:12:19 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -219,7 +219,7 @@ void bx_dbg_set_reg8h_value(unsigned reg, Bit8u value);
|
||||
void bx_dbg_set_reg16_value(unsigned reg, Bit16u value);
|
||||
void bx_dbg_set_reg32_value(unsigned reg, Bit32u value);
|
||||
void bx_dbg_set_reg64_value(unsigned reg, Bit64u value);
|
||||
Bit32u bx_dbg_get_laddr(Bit16u sel, Bit32u ofs);
|
||||
bx_address bx_dbg_get_laddr(Bit16u sel, bx_address ofs);
|
||||
void bx_dbg_step_over_command(void);
|
||||
void bx_dbg_trace_command(bx_bool enable);
|
||||
void bx_dbg_trace_reg_command(bx_bool enable);
|
||||
@ -456,7 +456,7 @@ typedef struct bx_guard_found_t {
|
||||
unsigned guard_found;
|
||||
unsigned iaddr_index;
|
||||
Bit64u icount; // number of completed instructions from last breakpoint hit
|
||||
Bit32u cs; // cs:eip and linear addr of instruction at guard point
|
||||
Bit32u cs; // cs:eip and linear addr of instruction at guard point
|
||||
bx_address eip;
|
||||
bx_address laddr;
|
||||
// 00 - 16 bit, 01 - 32 bit, 10 - 64-bit, 11 - illegal
|
||||
|
@ -1,6 +1,6 @@
|
||||
%{
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: lexer.l,v 1.28 2009-04-03 17:36:24 sshwarts Exp $
|
||||
// $Id: lexer.l,v 1.29 2009-04-07 16:12:19 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -8,6 +8,7 @@
|
||||
|
||||
#ifdef WIN32
|
||||
#include <io.h>
|
||||
#define YY_NO_UNISTD_H
|
||||
#endif
|
||||
|
||||
#include "debug.h"
|
||||
|
14
bochs/configure
vendored
14
bochs/configure
vendored
@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# From configure.in Id: configure.in,v 1.392 2009/03/10 19:33:03 vruppert Exp .
|
||||
# From configure.in Id: configure.in,v 1.393 2009/03/13 18:48:08 sshwarts Exp .
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.61.
|
||||
#
|
||||
@ -37929,7 +37929,7 @@ _ACEOF
|
||||
CXX="$CC"
|
||||
#C_OPT="/Zi" # for debugging
|
||||
C_OPT="/Ox" # optimize for speed
|
||||
CFLAGS="/nologo /G6 /MT /W3 /GX- /DNDEBUG /DWIN32 /D_WINDOWS $C_OPT"
|
||||
CFLAGS="/nologo /MT /W3 /EHs-c- /DNDEBUG /DWIN32 /D_WINDOWS /D_CRT_SECURE_NO_WARNINGS $C_OPT"
|
||||
CXXFLAGS="$CFLAGS"
|
||||
DASH="/"
|
||||
SLASH="\\"
|
||||
@ -37961,7 +37961,7 @@ _ACEOF
|
||||
_ACEOF
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define inline __inline
|
||||
#define inline __forceinline
|
||||
_ACEOF
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
@ -37978,6 +37978,14 @@ _ACEOF
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define BX_HAVE_HASH_MAP_H 0
|
||||
_ACEOF
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define BX_HAVE_STRICMP 0
|
||||
_ACEOF
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define BX_HAVE_STRCASECMP 0
|
||||
_ACEOF
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
|
@ -2,7 +2,7 @@ dnl // Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
AC_INIT(bochs.h)
|
||||
AC_REVISION([[$Id: configure.in,v 1.393 2009-03-13 18:48:08 sshwarts Exp $]])
|
||||
AC_REVISION([[$Id: configure.in,v 1.394 2009-04-07 16:12:19 sshwarts Exp $]])
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
AC_CONFIG_HEADER(ltdlconf.h)
|
||||
|
||||
@ -2667,7 +2667,7 @@ case "$target" in
|
||||
CXX="$CC"
|
||||
#C_OPT="/Zi" # for debugging
|
||||
C_OPT="/Ox" # optimize for speed
|
||||
CFLAGS="/nologo /G6 /MT /W3 /GX- /DNDEBUG /DWIN32 /D_WINDOWS $C_OPT"
|
||||
CFLAGS="/nologo /MT /W3 /EHs-c- /DNDEBUG /DWIN32 /D_WINDOWS /D_CRT_SECURE_NO_WARNINGS $C_OPT"
|
||||
CXXFLAGS="$CFLAGS"
|
||||
DASH="/"
|
||||
SLASH="\\"
|
||||
@ -2695,11 +2695,13 @@ case "$target" in
|
||||
CD_UP_THREE="cd ..\..\.."
|
||||
have_gettimeofday=0 # even though it may exist in build environment
|
||||
AC_DEFINE(BX_64BIT_CONSTANTS_USE_LL, 0)
|
||||
AC_DEFINE(inline, __inline)
|
||||
AC_DEFINE(inline, __forceinline)
|
||||
AC_DEFINE(BX_NO_EMPTY_STRUCTS, 1)
|
||||
AC_DEFINE(BX_NO_ATTRIBUTES, 1)
|
||||
AC_DEFINE(BX_HAVE_HASH_MAP, 0)
|
||||
AC_DEFINE(BX_HAVE_HASH_MAP_H, 0)
|
||||
AC_DEFINE(BX_HAVE_STRICMP, 0)
|
||||
AC_DEFINE(BX_HAVE_STRCASECMP, 0)
|
||||
AC_DEFINE(BX_HAVE_STRTOULL, 0)
|
||||
AC_DEFINE(BX_HAVE_STRTOUQ, 0)
|
||||
AC_DEFINE(HAVE_LIBREADLINE, 0)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: cpu.cc,v 1.284 2009-04-06 18:27:30 sshwarts Exp $
|
||||
// $Id: cpu.cc,v 1.285 2009-04-07 16:12:19 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -128,11 +128,11 @@ void BX_CPU_C::cpu_loop(Bit32u max_instr_count)
|
||||
|
||||
no_async_event:
|
||||
|
||||
Bit32u eipBiased = RIP + BX_CPU_THIS_PTR eipPageBias;
|
||||
Bit32u eipBiased = (Bit32u)(RIP + BX_CPU_THIS_PTR eipPageBias);
|
||||
|
||||
if (eipBiased >= BX_CPU_THIS_PTR eipPageWindowSize) {
|
||||
prefetch();
|
||||
eipBiased = RIP + BX_CPU_THIS_PTR eipPageBias;
|
||||
eipBiased = (Bit32u)(RIP + BX_CPU_THIS_PTR eipPageBias);
|
||||
}
|
||||
|
||||
bx_phy_address pAddr = BX_CPU_THIS_PTR pAddrPage + eipBiased;
|
||||
@ -713,7 +713,7 @@ void BX_CPU_C::prefetch(void)
|
||||
|
||||
BX_CPU_THIS_PTR eipPageWindowSize = 4096;
|
||||
if (limit + BX_CPU_THIS_PTR eipPageBias < 4096) {
|
||||
BX_CPU_THIS_PTR eipPageWindowSize = limit + BX_CPU_THIS_PTR eipPageBias + 1;
|
||||
BX_CPU_THIS_PTR eipPageWindowSize = (Bit32u)(limit + BX_CPU_THIS_PTR eipPageBias + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -733,7 +733,7 @@ void BX_CPU_C::prefetch(void)
|
||||
pAddr = translate_linear(laddr, CPL, BX_EXECUTE);
|
||||
}
|
||||
else {
|
||||
pAddr = laddr;
|
||||
pAddr = (bx_phy_address) laddr;
|
||||
}
|
||||
|
||||
BX_CPU_THIS_PTR pAddrPage = LPFOf(pAddr);
|
||||
|
108
bochs/cpu/cpu.h
108
bochs/cpu/cpu.h
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: cpu.h,v 1.590 2009-04-06 18:44:28 sshwarts Exp $
|
||||
// $Id: cpu.h,v 1.591 2009-04-07 16:12:19 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -2740,17 +2740,17 @@ public: // for now...
|
||||
// <TAG-CLASS-CPU-END>
|
||||
|
||||
#if BX_DEBUGGER
|
||||
BX_SMF void dbg_take_irq(void);
|
||||
BX_SMF void dbg_force_interrupt(unsigned vector);
|
||||
BX_SMF void dbg_take_dma(void);
|
||||
BX_SMF bx_bool dbg_set_reg(unsigned reg, Bit32u val);
|
||||
BX_SMF Bit32u dbg_get_reg(unsigned reg);
|
||||
BX_SMF bx_bool dbg_get_sreg(bx_dbg_sreg_t *sreg, unsigned sreg_no);
|
||||
BX_SMF void dbg_get_tr(bx_dbg_sreg_t *sreg);
|
||||
BX_SMF void dbg_get_ldtr(bx_dbg_sreg_t *sreg);
|
||||
BX_SMF void dbg_get_gdtr(bx_dbg_global_sreg_t *sreg);
|
||||
BX_SMF void dbg_get_idtr(bx_dbg_global_sreg_t *sreg);
|
||||
BX_SMF unsigned dbg_query_pending(void);
|
||||
BX_SMF void dbg_take_irq(void);
|
||||
BX_SMF void dbg_force_interrupt(unsigned vector);
|
||||
BX_SMF void dbg_take_dma(void);
|
||||
BX_SMF bx_bool dbg_set_reg(unsigned reg, Bit32u val);
|
||||
BX_SMF bx_address dbg_get_reg(unsigned reg);
|
||||
BX_SMF bx_bool dbg_get_sreg(bx_dbg_sreg_t *sreg, unsigned sreg_no);
|
||||
BX_SMF void dbg_get_tr(bx_dbg_sreg_t *sreg);
|
||||
BX_SMF void dbg_get_ldtr(bx_dbg_sreg_t *sreg);
|
||||
BX_SMF void dbg_get_gdtr(bx_dbg_global_sreg_t *sreg);
|
||||
BX_SMF void dbg_get_idtr(bx_dbg_global_sreg_t *sreg);
|
||||
BX_SMF unsigned dbg_query_pending(void);
|
||||
#endif
|
||||
#if BX_DEBUGGER || BX_GDBSTUB
|
||||
BX_SMF bx_bool dbg_instruction_epilog(void);
|
||||
@ -2868,85 +2868,85 @@ public: // for now...
|
||||
// write
|
||||
#define write_virtual_byte(seg, offset, data) \
|
||||
(BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) ? \
|
||||
write_virtual_byte_64(seg, offset, data) : \
|
||||
write_virtual_byte_32(seg, offset, data)
|
||||
write_virtual_byte_64(seg, (Bit64u) offset, data) : \
|
||||
write_virtual_byte_32(seg, (Bit32u) offset, data)
|
||||
|
||||
#define write_virtual_word(seg, offset, data) \
|
||||
(BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) ? \
|
||||
write_virtual_word_64(seg, offset, data) : \
|
||||
write_virtual_word_32(seg, offset, data)
|
||||
write_virtual_word_64(seg, (Bit64u) offset, data) : \
|
||||
write_virtual_word_32(seg, (Bit32u) offset, data)
|
||||
|
||||
#define write_virtual_dword(seg, offset, data) \
|
||||
(BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) ? \
|
||||
write_virtual_dword_64(seg, offset, data) : \
|
||||
write_virtual_dword_32(seg, offset, data)
|
||||
write_virtual_dword_64(seg, (Bit64u) offset, data) : \
|
||||
write_virtual_dword_32(seg, (Bit32u) offset, data)
|
||||
|
||||
#define write_virtual_qword(seg, offset, data) \
|
||||
(BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) ? \
|
||||
write_virtual_qword_64(seg, offset, data) : \
|
||||
write_virtual_qword_32(seg, offset, data)
|
||||
write_virtual_qword_64(seg, (Bit64u) offset, data) : \
|
||||
write_virtual_qword_32(seg, (Bit32u) offset, data)
|
||||
|
||||
#define write_virtual_dqword(seg, offset, data) \
|
||||
(BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) ? \
|
||||
write_virtual_dqword_64(seg, offset, (const BxPackedXmmRegister*)(data)) : \
|
||||
write_virtual_dqword_32(seg, offset, (const BxPackedXmmRegister*)(data))
|
||||
write_virtual_dqword_64(seg, (Bit64u) offset, (const BxPackedXmmRegister*)(data)) : \
|
||||
write_virtual_dqword_32(seg, (Bit32u) offset, (const BxPackedXmmRegister*)(data))
|
||||
|
||||
#define write_virtual_dqword_aligned(seg, offset, data) \
|
||||
#define write_virtual_dqword_aligned(seg, offset, data) \
|
||||
(BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) ? \
|
||||
write_virtual_dqword_aligned_64(seg, offset, (const BxPackedXmmRegister*)(data)) : \
|
||||
write_virtual_dqword_aligned_32(seg, offset, (const BxPackedXmmRegister*)(data))
|
||||
write_virtual_dqword_aligned_64(seg, (Bit64u) offset, (const BxPackedXmmRegister*)(data)) : \
|
||||
write_virtual_dqword_aligned_32(seg, (Bit32u) offset, (const BxPackedXmmRegister*)(data))
|
||||
|
||||
// read
|
||||
#define read_virtual_byte(seg, offset) \
|
||||
(BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) ? \
|
||||
read_virtual_byte_64(seg, offset) : \
|
||||
read_virtual_byte_32(seg, offset)
|
||||
#define read_virtual_byte(seg, offset) \
|
||||
(BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) ? \
|
||||
read_virtual_byte_64(seg, (Bit64u) offset) : \
|
||||
read_virtual_byte_32(seg, (Bit32u) offset)
|
||||
|
||||
#define read_virtual_word(seg, offset) \
|
||||
(BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) ? \
|
||||
read_virtual_word_64(seg, offset) : \
|
||||
read_virtual_word_32(seg, offset)
|
||||
#define read_virtual_word(seg, offset) \
|
||||
(BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) ? \
|
||||
read_virtual_word_64(seg, (Bit64u) offset) : \
|
||||
read_virtual_word_32(seg, (Bit32u) offset)
|
||||
|
||||
#define read_virtual_dword(seg, offset) \
|
||||
(BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) ? \
|
||||
read_virtual_dword_64(seg, offset) : \
|
||||
read_virtual_dword_32(seg, offset)
|
||||
#define read_virtual_dword(seg, offset) \
|
||||
(BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) ? \
|
||||
read_virtual_dword_64(seg, (Bit64u) offset) : \
|
||||
read_virtual_dword_32(seg, (Bit32u) offset)
|
||||
|
||||
#define read_virtual_qword(seg, offset) \
|
||||
(BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) ? \
|
||||
read_virtual_qword_64(seg, offset) : \
|
||||
read_virtual_qword_32(seg, offset)
|
||||
#define read_virtual_qword(seg, offset) \
|
||||
(BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) ? \
|
||||
read_virtual_qword_64(seg, (Bit64u) offset) : \
|
||||
read_virtual_qword_32(seg, (Bit32u) offset)
|
||||
|
||||
#define read_virtual_dqword(seg, offset, data) \
|
||||
(BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) ? \
|
||||
read_virtual_dqword_64(seg, offset, (BxPackedXmmRegister*)(data)) : \
|
||||
read_virtual_dqword_32(seg, offset, (BxPackedXmmRegister*)(data))
|
||||
read_virtual_dqword_64(seg, (Bit64u) offset, (BxPackedXmmRegister*)(data)) : \
|
||||
read_virtual_dqword_32(seg, (Bit32u) offset, (BxPackedXmmRegister*)(data))
|
||||
|
||||
#define read_virtual_dqword_aligned(seg, offset, data) \
|
||||
#define read_virtual_dqword_aligned(seg, offset, data) \
|
||||
(BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) ? \
|
||||
read_virtual_dqword_aligned_64(seg, offset, (BxPackedXmmRegister*)(data)) : \
|
||||
read_virtual_dqword_aligned_32(seg, offset, (BxPackedXmmRegister*)(data))
|
||||
read_virtual_dqword_aligned_64(seg, (Bit64u) offset, (BxPackedXmmRegister*)(data)) : \
|
||||
read_virtual_dqword_aligned_32(seg, (Bit32u) offset, (BxPackedXmmRegister*)(data))
|
||||
|
||||
// RMW
|
||||
#define read_RMW_virtual_byte(seg, offset) \
|
||||
(BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) ? \
|
||||
read_RMW_virtual_byte_64(seg, offset) : \
|
||||
read_RMW_virtual_byte_32(seg, offset)
|
||||
read_RMW_virtual_byte_64(seg, (Bit64u) offset) : \
|
||||
read_RMW_virtual_byte_32(seg, (Bit32u) offset)
|
||||
|
||||
#define read_RMW_virtual_word(seg, offset) \
|
||||
(BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) ? \
|
||||
read_RMW_virtual_word_64(seg, offset) : \
|
||||
read_RMW_virtual_word_32(seg, offset)
|
||||
read_RMW_virtual_word_64(seg, (Bit64u) offset) : \
|
||||
read_RMW_virtual_word_32(seg, (Bit32u) offset)
|
||||
|
||||
#define read_RMW_virtual_dword(seg, offset) \
|
||||
(BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) ? \
|
||||
read_RMW_virtual_dword_64(seg, offset) : \
|
||||
read_RMW_virtual_dword_32(seg, offset)
|
||||
read_RMW_virtual_dword_64(seg, (Bit64u) offset) : \
|
||||
read_RMW_virtual_dword_32(seg, (Bit32u) offset)
|
||||
|
||||
#define read_RMW_virtual_qword(seg, offset) \
|
||||
(BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) ? \
|
||||
read_RMW_virtual_qword_64(seg, offset) : \
|
||||
read_RMW_virtual_qword_32(seg, offset)
|
||||
read_RMW_virtual_qword_64(seg, (Bit64u) offset) : \
|
||||
read_RMW_virtual_qword_32(seg, (Bit32u) offset)
|
||||
|
||||
#else
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: data_xfer32.cc,v 1.63 2009-04-06 18:44:28 sshwarts Exp $
|
||||
// $Id: data_xfer32.cc,v 1.64 2009-04-07 16:12:19 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -54,7 +54,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::MOV_ERXId(bxInstruction_c *i)
|
||||
|
||||
void BX_CPP_AttrRegparmN(1) BX_CPU_C::MOV32_EdGdM(bxInstruction_c *i)
|
||||
{
|
||||
Bit32u eaddr = BX_CPU_CALL_METHODR(i->ResolveModrm, (i));
|
||||
Bit32u eaddr = (Bit32u) BX_CPU_CALL_METHODR(i->ResolveModrm, (i));
|
||||
|
||||
write_virtual_dword_32(i->seg(), eaddr, BX_READ_32BIT_REG(i->nnn()));
|
||||
}
|
||||
@ -66,7 +66,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::MOV_GdEdR(bxInstruction_c *i)
|
||||
|
||||
void BX_CPP_AttrRegparmN(1) BX_CPU_C::MOV32_GdEdM(bxInstruction_c *i)
|
||||
{
|
||||
Bit32u eaddr = BX_CPU_CALL_METHODR(i->ResolveModrm, (i));
|
||||
Bit32u eaddr = (Bit32u) BX_CPU_CALL_METHODR(i->ResolveModrm, (i));
|
||||
|
||||
Bit32u val32 = read_virtual_dword_32(i->seg(), eaddr);
|
||||
BX_WRITE_32BIT_REGZ(i->nnn(), val32);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: debugstuff.cc,v 1.104 2009-04-05 18:16:29 sshwarts Exp $
|
||||
// $Id: debugstuff.cc,v 1.105 2009-04-07 16:12:19 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -273,7 +273,7 @@ void BX_CPU_C::debug(bx_address offset)
|
||||
|
||||
|
||||
#if BX_DEBUGGER
|
||||
Bit32u BX_CPU_C::dbg_get_reg(unsigned reg)
|
||||
bx_address BX_CPU_C::dbg_get_reg(unsigned reg)
|
||||
{
|
||||
Bit32u return_val32;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: io.cc,v 1.77 2009-04-05 19:09:44 sshwarts Exp $
|
||||
// $Id: io.cc,v 1.78 2009-04-07 16:12:19 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -846,7 +846,7 @@ bx_bool BX_CPP_AttrRegparmN(3) BX_CPU_C::allow_io(bxInstruction_c *i, Bit16u por
|
||||
return(0);
|
||||
}
|
||||
|
||||
Bit16u io_base = system_read_word(BX_CPU_THIS_PTR tr.cache.u.segment.base + 102);
|
||||
Bit32u io_base = system_read_word(BX_CPU_THIS_PTR tr.cache.u.segment.base + 102);
|
||||
|
||||
if ((io_base + port/8) >= BX_CPU_THIS_PTR tr.cache.u.segment.limit_scaled) {
|
||||
BX_DEBUG(("allow_io(): IO port %x (len %d) outside TSS IO permission map (base=%x, limit=%x) #GP(0)",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: msr.cc,v 1.16 2009-02-20 22:00:42 sshwarts Exp $
|
||||
// $Id: msr.cc,v 1.17 2009-04-07 16:12:19 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) 2008 Stanislav Shwartsman
|
||||
@ -530,7 +530,7 @@ bx_bool BX_CPU_C::relocate_apic(Bit64u val_64)
|
||||
BX_ERROR(("relocate_apic: attempt to set reserved bits"));
|
||||
return 0;
|
||||
}
|
||||
BX_CPU_THIS_PTR msr.apicbase = val_64;
|
||||
BX_CPU_THIS_PTR msr.apicbase = (bx_phy_address) val_64;
|
||||
BX_CPU_THIS_PTR lapic.set_base(BX_CPU_THIS_PTR msr.apicbase);
|
||||
// TLB flush is required for emulation correctness
|
||||
TLB_flush(); // don't care about performance of apic relocation
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: paging.cc,v 1.173 2009-03-27 16:42:21 sshwarts Exp $
|
||||
// $Id: paging.cc,v 1.174 2009-04-07 16:12:19 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -706,7 +706,8 @@ bx_phy_address BX_CPU_C::translate_linear_PAE(bx_address laddr, bx_address &lpf_
|
||||
bx_phy_address pdpe_addr, ppf;
|
||||
Bit64u pdpe, pde, pte;
|
||||
#if BX_SUPPORT_X86_64
|
||||
Bit64u pml4, pml4_addr = 0;
|
||||
Bit64u pml4;
|
||||
bx_phy_address pml4_addr = 0;
|
||||
#endif
|
||||
unsigned priv_index, nx_fault = 0;
|
||||
bx_bool isWrite = (rw & 1); // write or r-m-w
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: proc_ctrl.cc,v 1.294 2009-04-05 19:09:44 sshwarts Exp $
|
||||
// $Id: proc_ctrl.cc,v 1.295 2009-04-07 16:12:19 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -221,7 +221,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::CLFLUSH(bxInstruction_c *i)
|
||||
{
|
||||
// check if we could access the memory segment
|
||||
if (!(seg->cache.valid & SegAccessROK)) {
|
||||
if (! execute_virtual_checks(seg, eaddr, 1))
|
||||
if (! execute_virtual_checks(seg, (Bit32u) eaddr, 1))
|
||||
exception(int_number(i->seg()), 0, 0);
|
||||
}
|
||||
else {
|
||||
@ -399,7 +399,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::MOV_RdDd(bxInstruction_c *i)
|
||||
case 1: // DR1
|
||||
case 2: // DR2
|
||||
case 3: // DR3
|
||||
val_32 = BX_CPU_THIS_PTR dr[i->nnn()];
|
||||
val_32 = (Bit32u) BX_CPU_THIS_PTR dr[i->nnn()];
|
||||
break;
|
||||
|
||||
case 4: // DR4
|
||||
@ -679,7 +679,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::MOV_RdCd(bxInstruction_c *i)
|
||||
|
||||
switch (i->nnn()) {
|
||||
case 0: // CR0 (MSW)
|
||||
val_32 = read_CR0(); /* correctly handle VMX */
|
||||
val_32 = (Bit32u) read_CR0(); /* correctly handle VMX */
|
||||
break;
|
||||
case 2: /* CR2 */
|
||||
val_32 = (Bit32u) BX_CPU_THIS_PTR cr2;
|
||||
@ -692,7 +692,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::MOV_RdCd(bxInstruction_c *i)
|
||||
break;
|
||||
case 4: // CR4
|
||||
#if BX_CPU_LEVEL > 3
|
||||
val_32 = read_CR4(); /* correctly handle VMX */
|
||||
val_32 = (Bit32u) read_CR4(); /* correctly handle VMX */
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
@ -879,7 +879,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::LMSW_Ew(bxInstruction_c *i)
|
||||
|
||||
void BX_CPP_AttrRegparmN(1) BX_CPU_C::SMSW_EwR(bxInstruction_c *i)
|
||||
{
|
||||
Bit32u msw = read_CR0(); // handle CR0 shadow in VMX
|
||||
Bit32u msw = (Bit32u) read_CR0(); // handle CR0 shadow in VMX
|
||||
|
||||
if (i->os32L()) {
|
||||
BX_WRITE_32BIT_REGZ(i->rm(), msw);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: smm.cc,v 1.60 2009-04-05 19:09:44 sshwarts Exp $
|
||||
// $Id: smm.cc,v 1.61 2009-04-07 16:12:19 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) 2006 Stanislav Shwartsman
|
||||
@ -522,7 +522,7 @@ bx_bool BX_CPU_C::smram_restore_state(const Bit32u *saved_state)
|
||||
}
|
||||
setEFlags(temp_eflags);
|
||||
|
||||
bx_phy_address temp_cr3 = SMRAM_FIELD64(saved_state, SMRAM_FIELD_CR3_HI32, SMRAM_FIELD_CR3);
|
||||
bx_phy_address temp_cr3 = (bx_phy_address) SMRAM_FIELD64(saved_state, SMRAM_FIELD_CR3_HI32, SMRAM_FIELD_CR3);
|
||||
SetCR3(temp_cr3);
|
||||
|
||||
for (int n=0; n<BX_GENERAL_REGISTERS; n++) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: stack32.cc,v 1.59 2009-03-10 16:28:01 sshwarts Exp $
|
||||
// $Id: stack32.cc,v 1.60 2009-04-07 16:12:19 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -156,7 +156,7 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::PUSH_Id(bxInstruction_c *i)
|
||||
|
||||
void BX_CPP_AttrRegparmN(1) BX_CPU_C::PUSH_EdM(bxInstruction_c *i)
|
||||
{
|
||||
bx_address eaddr = BX_CPU_CALL_METHODR(i->ResolveModrm, (i));
|
||||
Bit32u eaddr = (Bit32u) BX_CPU_CALL_METHODR(i->ResolveModrm, (i));
|
||||
|
||||
Bit32u op1_32 = read_virtual_dword_32(i->seg(), eaddr);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: win32_enh_dbg_osdep.cc,v 1.12 2009-04-03 17:36:24 sshwarts Exp $
|
||||
// $Id: win32_enh_dbg_osdep.cc,v 1.13 2009-04-07 16:12:19 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// BOCHS ENHANCED DEBUGGER Ver 1.2
|
||||
@ -65,6 +65,11 @@ COLORREF AsmColors[4] = {
|
||||
#define LVIF_GROUPID 0
|
||||
#endif
|
||||
|
||||
#ifndef IS_WIN98
|
||||
// workaround broken code if IS_WIN98 not defined
|
||||
#define IS_WIN98
|
||||
#endif
|
||||
|
||||
// The wordsize popup is the 15th entry in the Opt menu -- COUNTING SEPARATORS
|
||||
// Index = (entry number - 1) -- if the Opt menu is modified, then update this value
|
||||
// -- or else the popup checkmarks won't work
|
||||
@ -1282,7 +1287,7 @@ LRESULT CALLBACK B_WP(HWND hh,UINT mm,WPARAM ww,LPARAM ll)
|
||||
bx_bool Group_OK = TRUE;
|
||||
MajWinVer = (Bit8u)(PackedVer & 0xff); // Major version # is in the LOW byte
|
||||
MinWinVer = (Bit8u)((PackedVer>>8) & 0xff);
|
||||
if (MajWinVer > 5 || (MajWinVer == 5 && MinWinVer >= 1) // is it XP or higher?
|
||||
if (MajWinVer > 5 || (MajWinVer == 5 && MinWinVer >= 1)) // is it XP or higher?
|
||||
{
|
||||
wchar_t* txt[] = {L"General Purpose",L"Segment",L"Control",L"MMX",L"SSE",L"Debug",L"Test",L"Other"};
|
||||
ListView_EnableGroupView(hL[REG_WND],TRUE);
|
||||
|
Loading…
Reference in New Issue
Block a user