comment out CS.LIMIT demotion fix - it causes too big slowdown.
Need to think about better solution + small optimization
This commit is contained in:
parent
17e513fa8a
commit
c3a73d3579
@ -1,5 +1,5 @@
|
|||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
// $Id: ctrl_xfer_pro.cc,v 1.81 2010-01-19 14:43:47 sshwarts Exp $
|
// $Id: ctrl_xfer_pro.cc,v 1.82 2010-01-31 18:06:44 sshwarts Exp $
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Copyright (C) 2001-2009 The Bochs Project
|
// Copyright (C) 2001-2009 The Bochs Project
|
||||||
@ -92,7 +92,7 @@ BX_CPU_C::load_cs(bx_selector_t *selector, bx_descriptor_t *descriptor, Bit8u cp
|
|||||||
|
|
||||||
touch_segment(selector, descriptor);
|
touch_segment(selector, descriptor);
|
||||||
|
|
||||||
#if BX_SUPPORT_TRACE_CACHE
|
#ifdef BX_SUPPORT_CS_LIMIT_DEMOTION
|
||||||
// Handle special case of CS.LIMIT demotion (new descriptor limit is
|
// Handle special case of CS.LIMIT demotion (new descriptor limit is
|
||||||
// smaller than current one)
|
// smaller than current one)
|
||||||
if (BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].cache.u.segment.limit_scaled > descriptor->u.segment.limit_scaled)
|
if (BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].cache.u.segment.limit_scaled > descriptor->u.segment.limit_scaled)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
// $Id: fetchdecode.cc,v 1.242 2010-01-31 09:45:27 sshwarts Exp $
|
// $Id: fetchdecode.cc,v 1.243 2010-01-31 18:06:44 sshwarts Exp $
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Copyright (C) 2001-2009 The Bochs Project
|
// Copyright (C) 2001-2009 The Bochs Project
|
||||||
@ -141,17 +141,6 @@ static unsigned sreg_mod01or10_rm16[8] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// decoding instructions; accessing seg reg's by index
|
// decoding instructions; accessing seg reg's by index
|
||||||
static unsigned sreg_mod01or10_rm32[8] = {
|
|
||||||
BX_SEG_REG_DS,
|
|
||||||
BX_SEG_REG_DS,
|
|
||||||
BX_SEG_REG_DS,
|
|
||||||
BX_SEG_REG_DS,
|
|
||||||
BX_SEG_REG_NULL, // escape to SIB-byte
|
|
||||||
BX_SEG_REG_SS,
|
|
||||||
BX_SEG_REG_DS,
|
|
||||||
BX_SEG_REG_DS
|
|
||||||
};
|
|
||||||
|
|
||||||
static unsigned sreg_mod0_base32[8] = {
|
static unsigned sreg_mod0_base32[8] = {
|
||||||
BX_SEG_REG_DS,
|
BX_SEG_REG_DS,
|
||||||
BX_SEG_REG_DS,
|
BX_SEG_REG_DS,
|
||||||
@ -2612,7 +2601,7 @@ fetch_b1:
|
|||||||
// mod==00b, rm!=4, rm!=5
|
// mod==00b, rm!=4, rm!=5
|
||||||
goto modrm_done;
|
goto modrm_done;
|
||||||
}
|
}
|
||||||
seg = sreg_mod01or10_rm32[rm];
|
seg = sreg_mod1or2_base32[rm];
|
||||||
if (mod == 0x40) { // mod == 01b
|
if (mod == 0x40) { // mod == 01b
|
||||||
if (ilen < remain) {
|
if (ilen < remain) {
|
||||||
// 8 sign extended to 32
|
// 8 sign extended to 32
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
// $Id: fetchdecode64.cc,v 1.244 2010-01-31 09:45:27 sshwarts Exp $
|
// $Id: fetchdecode64.cc,v 1.245 2010-01-31 18:06:44 sshwarts Exp $
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Copyright (C) 2001-2009 The Bochs Project
|
// Copyright (C) 2001-2009 The Bochs Project
|
||||||
@ -106,25 +106,6 @@ static const Bit8u BxOpcodeHasModrm64[512] = {
|
|||||||
// In 64-bit mode the CS, DS, ES, and SS segment overrides are ignored.
|
// In 64-bit mode the CS, DS, ES, and SS segment overrides are ignored.
|
||||||
|
|
||||||
// decoding instructions; accessing seg reg's by index
|
// decoding instructions; accessing seg reg's by index
|
||||||
static unsigned sreg_mod01or10_rm32[16] = {
|
|
||||||
BX_SEG_REG_DS,
|
|
||||||
BX_SEG_REG_DS,
|
|
||||||
BX_SEG_REG_DS,
|
|
||||||
BX_SEG_REG_DS,
|
|
||||||
BX_SEG_REG_NULL, // escape to SIB-byte
|
|
||||||
BX_SEG_REG_SS,
|
|
||||||
BX_SEG_REG_DS,
|
|
||||||
BX_SEG_REG_DS,
|
|
||||||
BX_SEG_REG_DS,
|
|
||||||
BX_SEG_REG_DS,
|
|
||||||
BX_SEG_REG_DS,
|
|
||||||
BX_SEG_REG_DS,
|
|
||||||
BX_SEG_REG_NULL, // escape to SIB-byte
|
|
||||||
BX_SEG_REG_DS,
|
|
||||||
BX_SEG_REG_DS,
|
|
||||||
BX_SEG_REG_DS,
|
|
||||||
};
|
|
||||||
|
|
||||||
static unsigned sreg_mod0_base32[16] = {
|
static unsigned sreg_mod0_base32[16] = {
|
||||||
BX_SEG_REG_DS,
|
BX_SEG_REG_DS,
|
||||||
BX_SEG_REG_DS,
|
BX_SEG_REG_DS,
|
||||||
@ -3543,7 +3524,7 @@ get_32bit_displ:
|
|||||||
// mod==00b, rm!=4, rm!=5
|
// mod==00b, rm!=4, rm!=5
|
||||||
goto modrm_done;
|
goto modrm_done;
|
||||||
}
|
}
|
||||||
seg = sreg_mod01or10_rm32[rm];
|
seg = sreg_mod1or2_base32[rm];
|
||||||
if (mod == 0x40) { // mod == 01b
|
if (mod == 0x40) { // mod == 01b
|
||||||
get_8bit_displ:
|
get_8bit_displ:
|
||||||
if (ilen < remain) {
|
if (ilen < remain) {
|
||||||
@ -3605,7 +3586,7 @@ get_8bit_displ:
|
|||||||
// mod==00b, rm!=4, rm!=5
|
// mod==00b, rm!=4, rm!=5
|
||||||
goto modrm_done;
|
goto modrm_done;
|
||||||
}
|
}
|
||||||
seg = sreg_mod01or10_rm32[rm];
|
seg = sreg_mod1or2_base32[rm];
|
||||||
if (mod == 0x40) // mod == 01b
|
if (mod == 0x40) // mod == 01b
|
||||||
goto get_8bit_displ;
|
goto get_8bit_displ;
|
||||||
// (mod == 0x80) mod == 10b
|
// (mod == 0x80) mod == 10b
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
// $Id: proc_ctrl.cc,v 1.309 2009-12-04 16:53:12 sshwarts Exp $
|
// $Id: proc_ctrl.cc,v 1.310 2010-01-31 18:06:44 sshwarts Exp $
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Copyright (C) 2001-2009 The Bochs Project
|
// Copyright (C) 2001-2009 The Bochs Project
|
||||||
@ -1274,14 +1274,14 @@ void BX_CPU_C::handleAlignmentCheck(void)
|
|||||||
if (BX_CPU_THIS_PTR alignment_check_mask == 0) {
|
if (BX_CPU_THIS_PTR alignment_check_mask == 0) {
|
||||||
BX_CPU_THIS_PTR alignment_check_mask = 0xF;
|
BX_CPU_THIS_PTR alignment_check_mask = 0xF;
|
||||||
BX_INFO(("Enable alignment check (#AC exception)"));
|
BX_INFO(("Enable alignment check (#AC exception)"));
|
||||||
BX_CPU_THIS_PTR iCache.flushICacheEntries();
|
// BX_CPU_THIS_PTR iCache.flushICacheEntries();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (BX_CPU_THIS_PTR alignment_check_mask != 0) {
|
if (BX_CPU_THIS_PTR alignment_check_mask != 0) {
|
||||||
BX_CPU_THIS_PTR alignment_check_mask = 0;
|
BX_CPU_THIS_PTR alignment_check_mask = 0;
|
||||||
BX_INFO(("Disable alignment check (#AC exception)"));
|
BX_INFO(("Disable alignment check (#AC exception)"));
|
||||||
BX_CPU_THIS_PTR iCache.flushICacheEntries();
|
// BX_CPU_THIS_PTR iCache.flushICacheEntries();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
// $Id: tasking.cc,v 1.78 2009-12-17 11:11:58 sshwarts Exp $
|
// $Id: tasking.cc,v 1.79 2010-01-31 18:06:45 sshwarts Exp $
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Copyright (C) 2001-2009 The Bochs Project
|
// Copyright (C) 2001-2009 The Bochs Project
|
||||||
@ -647,7 +647,7 @@ void BX_CPU_C::task_switch(bxInstruction_c *i, bx_selector_t *tss_selector,
|
|||||||
|
|
||||||
touch_segment(&cs_selector, &cs_descriptor);
|
touch_segment(&cs_selector, &cs_descriptor);
|
||||||
|
|
||||||
#if BX_SUPPORT_TRACE_CACHE
|
#ifdef BX_SUPPORT_CS_LIMIT_DEMOTION
|
||||||
// Handle special case of CS.LIMIT demotion (new descriptor limit is
|
// Handle special case of CS.LIMIT demotion (new descriptor limit is
|
||||||
// smaller than current one)
|
// smaller than current one)
|
||||||
if (BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].cache.u.segment.limit_scaled > cs_descriptor.u.segment.limit_scaled)
|
if (BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].cache.u.segment.limit_scaled > cs_descriptor.u.segment.limit_scaled)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
// $Id: vmx.cc,v 1.28 2009-12-17 11:11:58 sshwarts Exp $
|
// $Id: vmx.cc,v 1.29 2010-01-31 18:06:45 sshwarts Exp $
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Copyright (c) 2009 Stanislav Shwartsman
|
// Copyright (c) 2009 Stanislav Shwartsman
|
||||||
@ -1298,7 +1298,7 @@ Bit32u BX_CPU_C::VMenterLoadCheckGuestState(Bit64u *qualification)
|
|||||||
BX_CPU_THIS_PTR eflags = (Bit32u) guest.rflags;
|
BX_CPU_THIS_PTR eflags = (Bit32u) guest.rflags;
|
||||||
BX_CPU_THIS_PTR lf_flags_status = 0; // OSZAPC flags are known.
|
BX_CPU_THIS_PTR lf_flags_status = 0; // OSZAPC flags are known.
|
||||||
|
|
||||||
#if BX_SUPPORT_TRACE_CACHE
|
#ifdef BX_SUPPORT_CS_LIMIT_DEMOTION
|
||||||
// Handle special case of CS.LIMIT demotion (new descriptor limit is
|
// Handle special case of CS.LIMIT demotion (new descriptor limit is
|
||||||
// smaller than current one)
|
// smaller than current one)
|
||||||
if (BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].cache.u.segment.limit_scaled > guest.sregs[BX_SEG_REG_CS].cache.u.segment.limit_scaled)
|
if (BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].cache.u.segment.limit_scaled > guest.sregs[BX_SEG_REG_CS].cache.u.segment.limit_scaled)
|
||||||
|
Loading…
Reference in New Issue
Block a user