diff options
author | Geoffrey Blake <geoffrey.blake@arm.com> | 2012-03-09 09:59:27 -0500 |
---|---|---|
committer | Geoffrey Blake <geoffrey.blake@arm.com> | 2012-03-09 09:59:27 -0500 |
commit | 043709fdfab3b6c46f6ef95d1f642cd3c06ee20a (patch) | |
tree | ef8bab03f4260b67b57b00844d0245ca1e849ea0 /src/arch/arm/utility.cc | |
parent | df05ffab1289b26aab2a0eb71ee55dcb7f42e5e9 (diff) | |
download | gem5-043709fdfab3b6c46f6ef95d1f642cd3c06ee20a.tar.xz |
CheckerCPU: Make CheckerCPU runtime selectable instead of compile selectable
Enables the CheckerCPU to be selected at runtime with the --checker option
from the configs/example/fs.py and configs/example/se.py configuration
files. Also merges with the SE/FS changes.
Diffstat (limited to 'src/arch/arm/utility.cc')
-rw-r--r-- | src/arch/arm/utility.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/arch/arm/utility.cc b/src/arch/arm/utility.cc index 07932e676..28ffb6896 100644 --- a/src/arch/arm/utility.cc +++ b/src/arch/arm/utility.cc @@ -43,7 +43,7 @@ #include "arch/arm/tlb.hh" #include "arch/arm/utility.hh" #include "arch/arm/vtophys.hh" -#include "config/use_checker.hh" +#include "cpu/checker/cpu.hh" #include "cpu/base.hh" #include "cpu/thread_context.hh" #include "mem/fs_translating_port_proxy.hh" @@ -118,11 +118,13 @@ skipFunction(ThreadContext *tc) { TheISA::PCState newPC = tc->pcState(); newPC.set(tc->readIntReg(ReturnAddressReg) & ~ULL(1)); -#if USE_CHECKER - tc->pcStateNoRecord(newPC); -#else - tc->pcState(newPC); -#endif + + CheckerCPU *checker = tc->getCheckerCpuPtr(); + if (checker) { + tc->pcStateNoRecord(newPC); + } else { + tc->pcState(newPC); + } } void |