Fixed problem with trace cache enabled

String instructions might confise trace cache by finishing instruction execution method without actually completing an instruction (and advancing eip)
This commit is contained in:
Stanislav Shwartsman 2007-12-13 18:42:31 +00:00
parent 05a5923971
commit 05c7a1e61b
2 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: fetchdecode.cc,v 1.146 2007-12-09 18:36:04 sshwarts Exp $
// $Id: fetchdecode.cc,v 1.147 2007-12-13 18:42:31 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -2941,8 +2941,8 @@ modrm_done:
instruction->setSeg(BX_SEG_REG_DS);
#if BX_SUPPORT_TRACE_CACHE
// set stop-trace attribute for invalid instructions
if(instruction->execute == &BX_CPU_C::BxError) {
// set stop-trace attribute for invalid and string instructions
if(instruction->execute == &BX_CPU_C::BxError || instruction->repUsedL()) {
instruction->setStopTraceAttr();
}
#endif

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: fetchdecode64.cc,v 1.154 2007-12-09 18:36:05 sshwarts Exp $
// $Id: fetchdecode64.cc,v 1.155 2007-12-13 18:42:31 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -3893,8 +3893,8 @@ modrm_done:
instruction->setSeg(BX_SEG_REG_DS);
#if BX_SUPPORT_TRACE_CACHE
// set stop-trace attribute for invalid instructions
if(instruction->execute == &BX_CPU_C::BxError) {
// set stop-trace attribute for invalid and string instructions
if(instruction->execute == &BX_CPU_C::BxError || instruction->repUsedL()) {
instruction->setStopTraceAttr();
}
#endif