summaryrefslogtreecommitdiff
path: root/src/arch/sparc
diff options
context:
space:
mode:
authorChander Sudanthi <chander.sudanthi@arm.com>2011-05-13 17:27:00 -0500
committerChander Sudanthi <chander.sudanthi@arm.com>2011-05-13 17:27:00 -0500
commit4bf48a11efd7253bdb7a61da42d2bc754033757b (patch)
tree6cfb8c58569c81b4daf9ccd86fbfa4ac7b643d02 /src/arch/sparc
parent5299c75e62832aab2e200b22c73865ed9c51b335 (diff)
downloadgem5-4bf48a11efd7253bdb7a61da42d2bc754033757b.tar.xz
Trace: Allow printing ASIDs and selectively tracing based on user/kernel code.
Debug flags are ExecUser, ExecKernel, and ExecAsid. ExecUser and ExecKernel are set by default when Exec is specified. Use minus sign with ExecUser or ExecKernel to remove user or kernel tracing respectively.
Diffstat (limited to 'src/arch/sparc')
-rw-r--r--src/arch/sparc/utility.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arch/sparc/utility.hh b/src/arch/sparc/utility.hh
index b702e6838..76b551ac8 100644
--- a/src/arch/sparc/utility.hh
+++ b/src/arch/sparc/utility.hh
@@ -94,6 +94,12 @@ advancePC(PCState &pc, const StaticInstPtr inst)
inst->advancePC(pc);
}
+inline uint64_t
+getExecutingAsid(ThreadContext *tc)
+{
+ return tc->readMiscRegNoEffect(MISCREG_MMU_P_CONTEXT);
+}
+
} // namespace SparcISA
#endif