Small emulation speed optimization
This commit is contained in:
parent
c9c16ad87f
commit
d9bf2b8453
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: cpu.h,v 1.459 2008-04-19 13:21:21 sshwarts Exp $
|
||||
// $Id: cpu.h,v 1.460 2008-04-19 22:29:43 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -2936,10 +2936,10 @@ public: // for now...
|
||||
BX_SMF bx_bool smram_restore_state(const Bit32u *smm_saved_state);
|
||||
BX_SMF int int_number(bx_segment_reg_t *seg);
|
||||
BX_SMF int int_number(unsigned s);
|
||||
BX_SMF void SetCR0(Bit32u val_32);
|
||||
BX_SMF void SetCR0(Bit32u val_32) BX_CPP_AttrRegparmN(1);
|
||||
BX_SMF void CR3_change(bx_phy_address value) BX_CPP_AttrRegparmN(1);
|
||||
#if BX_CPU_LEVEL >= 4
|
||||
BX_SMF bx_bool SetCR4(bx_address val_32);
|
||||
BX_SMF bx_bool SetCR4(bx_address val) BX_CPP_AttrRegparmN(1);
|
||||
#endif
|
||||
BX_SMF void pagingCR0Changed(Bit32u oldCR0, Bit32u newCR0) BX_CPP_AttrRegparmN(2);
|
||||
BX_SMF void pagingCR4Changed(Bit32u oldCR4, Bit32u newCR4) BX_CPP_AttrRegparmN(2);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: icache.h,v 1.32 2008-04-05 17:51:55 sshwarts Exp $
|
||||
// $Id: icache.h,v 1.33 2008-04-19 22:29:44 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -79,12 +79,16 @@ public:
|
||||
pAddr >>= 12;
|
||||
#if BX_SUPPORT_TRACE_CACHE
|
||||
if ((pageWriteStampTable[pAddr] & ICacheWriteStampFetchModeMask) != ICacheWriteStampFetchModeMask) {
|
||||
stopTraceExecution(); // one of the CPUs running trace from this page
|
||||
// Decrement page write stamp, so iCache entries with older stamps are
|
||||
// effectively invalidated.
|
||||
pageWriteStampTable[pAddr]--;
|
||||
stopTraceExecution(); // one of the CPUs might be running trace from this page
|
||||
}
|
||||
#endif
|
||||
// Decrement page write stamp, so iCache entries with older stamps
|
||||
// are effectively invalidated.
|
||||
#else
|
||||
// Decrement page write stamp, so iCache entries with older stamps are
|
||||
// effectively invalidated.
|
||||
pageWriteStampTable[pAddr]--;
|
||||
#endif
|
||||
}
|
||||
|
||||
BX_CPP_INLINE void resetWriteStamps(void);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: proc_ctrl.cc,v 1.214 2008-04-18 18:32:40 sshwarts Exp $
|
||||
// $Id: proc_ctrl.cc,v 1.215 2008-04-19 22:29:44 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -1250,7 +1250,7 @@ void BX_CPU_C::handleAlignmentCheck(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
void BX_CPU_C::SetCR0(Bit32u val_32)
|
||||
void BX_CPP_AttrRegparmN(1) BX_CPU_C::SetCR0(Bit32u val_32)
|
||||
{
|
||||
bx_bool pe = val_32 & 0x01;
|
||||
bx_bool nw = (val_32 >> 29) & 0x01;
|
||||
@ -1329,7 +1329,7 @@ void BX_CPU_C::SetCR0(Bit32u val_32)
|
||||
}
|
||||
|
||||
#if BX_CPU_LEVEL >= 4
|
||||
bx_bool BX_CPU_C::SetCR4(bx_address val)
|
||||
bx_bool BX_CPP_AttrRegparmN(1) BX_CPU_C::SetCR4(bx_address val)
|
||||
{
|
||||
Bit32u oldCR4 = BX_CPU_THIS_PTR cr4.getRegister();
|
||||
bx_address allowMask = 0;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: segment_ctrl_pro.cc,v 1.86 2008-04-19 20:00:28 sshwarts Exp $
|
||||
// $Id: segment_ctrl_pro.cc,v 1.87 2008-04-19 22:29:44 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -264,7 +264,7 @@ void BX_CPU_C::loadSRegLMNominal(unsigned segI, unsigned selector, unsigned dpl)
|
||||
}
|
||||
#endif
|
||||
|
||||
void BX_CPU_C::validate_seg_reg(unsigned seg)
|
||||
BX_CPP_INLINE void BX_CPU_C::validate_seg_reg(unsigned seg)
|
||||
{
|
||||
/*
|
||||
FOR (seg = ES, DS, FS, GS)
|
||||
|
Loading…
Reference in New Issue
Block a user