very small cleeanup
This commit is contained in:
parent
77ce9d617e
commit
607900dd4d
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: cpu.cc,v 1.230 2008-05-10 20:35:03 sshwarts Exp $
|
||||
// $Id: cpu.cc,v 1.231 2008-06-12 16:40:52 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -171,9 +171,7 @@ no_async_event:
|
||||
}
|
||||
#else
|
||||
bxInstruction_c iStorage, *i = &iStorage;
|
||||
unsigned remainingInPage = BX_CPU_THIS_PTR eipPageWindowSize - eipBiased;
|
||||
const Bit8u *fetchPtr = BX_CPU_THIS_PTR eipFetchPtr + eipBiased;
|
||||
fetchInstruction(i, fetchPtr, remainingInPage);
|
||||
fetchInstruction(i, eipBiased);
|
||||
#endif
|
||||
|
||||
#if BX_SUPPORT_TRACE_CACHE
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: cpu.h,v 1.484 2008-06-02 20:11:03 sshwarts Exp $
|
||||
// $Id: cpu.h,v 1.485 2008-06-12 16:40:52 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -2799,7 +2799,7 @@ public: // for now...
|
||||
#if BX_SUPPORT_X86_64
|
||||
BX_SMF unsigned fetchDecode64(const Bit8u *fetchPtr, bxInstruction_c *i, unsigned remainingInPage) BX_CPP_AttrRegparmN(3);
|
||||
#endif
|
||||
BX_SMF bx_bool fetchInstruction(bxInstruction_c *iStorage, const Bit8u *fetchPtr, unsigned remainingInPage);
|
||||
BX_SMF bx_bool fetchInstruction(bxInstruction_c *iStorage, Bit32u eipBiased);
|
||||
BX_SMF void boundaryFetch(const Bit8u *fetchPtr, unsigned remainingInPage, bxInstruction_c *);
|
||||
#if BX_SUPPORT_ICACHE
|
||||
BX_SMF void serveICacheMiss(bxICacheEntry_c *entry, Bit32u eipBiased, bx_phy_address pAddr);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: icache.cc,v 1.12 2008-05-04 05:37:36 sshwarts Exp $
|
||||
// $Id: icache.cc,v 1.13 2008-06-12 16:40:53 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) 2007 Stanislav Shwartsman
|
||||
@ -26,8 +26,10 @@
|
||||
#include "cpu.h"
|
||||
#define LOG_THIS BX_CPU_THIS_PTR
|
||||
|
||||
bx_bool BX_CPU_C::fetchInstruction(bxInstruction_c *iStorage, const Bit8u *fetchPtr, unsigned remainingInPage)
|
||||
bx_bool BX_CPU_C::fetchInstruction(bxInstruction_c *iStorage, Bit32u eipBiased)
|
||||
{
|
||||
unsigned remainingInPage = BX_CPU_THIS_PTR eipPageWindowSize - eipBiased;
|
||||
const Bit8u *fetchPtr = BX_CPU_THIS_PTR eipFetchPtr + eipBiased;
|
||||
unsigned ret;
|
||||
|
||||
#if BX_SUPPORT_X86_64
|
||||
@ -163,13 +165,10 @@ bx_bool BX_CPU_C::mergeTraces(bxICacheEntry_c *entry, bxInstruction_c *i, bx_phy
|
||||
|
||||
void BX_CPU_C::serveICacheMiss(bxICacheEntry_c *cache_entry, Bit32u eipBiased, bx_phy_address pAddr)
|
||||
{
|
||||
unsigned remainingInPage = BX_CPU_THIS_PTR eipPageWindowSize - eipBiased;
|
||||
const Bit8u *fetchPtr = BX_CPU_THIS_PTR eipFetchPtr + eipBiased;
|
||||
|
||||
// The entry will be marked valid if fetchdecode will succeed
|
||||
cache_entry->writeStamp = ICacheWriteStampInvalid;
|
||||
|
||||
if (fetchInstruction(cache_entry->i, fetchPtr, remainingInPage)) {
|
||||
if (fetchInstruction(cache_entry->i, eipBiased)) {
|
||||
cache_entry->pAddr = pAddr;
|
||||
cache_entry->writeStamp = *(BX_CPU_THIS_PTR currPageWriteStampPtr);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user