cpu: Only check for PC events on instruction boundaries.

Only the instruction address is actually checked, so there's no need to check
repeatedly while we're working through the microops of a macroop and that's
not changing.
This commit is contained in:
Gabe Black
2014-12-05 01:47:35 -08:00
parent fe48c0a32b
commit bacbb8ecbc
3 changed files with 32 additions and 22 deletions

View File

@@ -1,4 +1,5 @@
/*
* Copyright 2014 Google, Inc.
* Copyright (c) 2012-2013 ARM Limited
* All rights reserved.
*
@@ -518,10 +519,11 @@ AtomicSimpleCPU::tick()
numCycles++;
ppCycles->notify(1);
if (!curStaticInst || !curStaticInst->isDelayedCommit())
if (!curStaticInst || !curStaticInst->isDelayedCommit()) {
checkForInterrupts();
checkPcEventQueue();
}
checkPcEventQueue();
// We must have just got suspended by a PC event
if (_status == Idle) {
tryCompleteDrain();

View File

@@ -1,4 +1,5 @@
/*
* Copyright 2014 Google, Inc.
* Copyright (c) 2010-2013 ARM Limited
* All rights reserved
*
@@ -551,10 +552,10 @@ TimingSimpleCPU::fetch()
{
DPRINTF(SimpleCPU, "Fetch\n");
if (!curStaticInst || !curStaticInst->isDelayedCommit())
if (!curStaticInst || !curStaticInst->isDelayedCommit()) {
checkForInterrupts();
checkPcEventQueue();
checkPcEventQueue();
}
// We must have just got suspended by a PC event
if (_status == Idle)