From bacbb8ecbcee2b4c5c3fe71f415abc5852ae4a8f Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Fri, 5 Dec 2014 01:47:35 -0800 Subject: 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. --- src/cpu/simple/atomic.cc | 6 ++++-- src/cpu/simple/timing.cc | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src/cpu/simple') diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc index 8dcae01c5..aeaebcdb8 100644 --- a/src/cpu/simple/atomic.cc +++ b/src/cpu/simple/atomic.cc @@ -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(); diff --git a/src/cpu/simple/timing.cc b/src/cpu/simple/timing.cc index c2bcdee63..c7db5c4f8 100644 --- a/src/cpu/simple/timing.cc +++ b/src/cpu/simple/timing.cc @@ -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) -- cgit v1.2.3