Avoid double check for a20addr <= BX_MEM_THIS len

This commit is contained in:
Stanislav Shwartsman 2006-05-31 20:23:58 +00:00
parent 005ca56f04
commit b0cbaf70e0

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: memory.cc,v 1.55 2006-04-29 16:55:22 sshwarts Exp $
// $Id: memory.cc,v 1.56 2006-05-31 20:23:58 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -100,13 +100,11 @@ BX_MEM_C::writePhysicalPage(BX_CPU_C *cpu, bx_phy_address addr, unsigned len, vo
mem_write:
#if BX_SUPPORT_ICACHE
if (a20addr < BX_MEM_THIS len)
pageWriteStampTable.decWriteStamp(a20addr);
#endif
// all memory access feets in single 4K page
if (a20addr <= BX_MEM_THIS len) {
#if BX_SUPPORT_ICACHE
pageWriteStampTable.decWriteStamp(a20addr);
#endif
// all of data is within limits of physical memory
if ((a20addr & 0xfff80000) != 0x00080000 || (a20addr <= 0x0009ffff))
{