summaryrefslogtreecommitdiff
path: root/src/sim/pseudo_inst.cc
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2008-11-10 11:51:18 -0800
committerNathan Binkert <nate@binkert.org>2008-11-10 11:51:18 -0800
commiteb5d9ba72b0309e7f98c382e3a80ce0601dbe084 (patch)
treedb510966579937d92bdacf4ad00b949e1ef0a5a8 /src/sim/pseudo_inst.cc
parentc25d966b06061402894b99a2362cb109275b73d1 (diff)
downloadgem5-eb5d9ba72b0309e7f98c382e3a80ce0601dbe084.tar.xz
pseudo inst: Add rpns (read processor nanoseconds) instruction.
This instruction basically returns the number of nanoseconds that the CPU has been running.
Diffstat (limited to 'src/sim/pseudo_inst.cc')
-rw-r--r--src/sim/pseudo_inst.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sim/pseudo_inst.cc b/src/sim/pseudo_inst.cc
index 409a6e009..e43279376 100644
--- a/src/sim/pseudo_inst.cc
+++ b/src/sim/pseudo_inst.cc
@@ -125,6 +125,12 @@ quiesceTime(ThreadContext *tc)
return (tc->readLastActivate() - tc->readLastSuspend()) / Clock::Int::ns;
}
+uint64_t
+rpns(ThreadContext *tc)
+{
+ return curTick / Clock::Int::ns;
+}
+
void
m5exit(ThreadContext *tc, Tick delay)
{