summaryrefslogtreecommitdiff
path: root/cpu/o3/ras.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cpu/o3/ras.cc')
-rw-r--r--cpu/o3/ras.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/cpu/o3/ras.cc b/cpu/o3/ras.cc
index 5e7ef38ae..0b3ea4918 100644
--- a/cpu/o3/ras.cc
+++ b/cpu/o3/ras.cc
@@ -42,6 +42,15 @@ ReturnAddrStack::init(unsigned _numEntries)
}
void
+ReturnAddrStack::reset()
+{
+ usedEntries = 0;
+ tos = 0;
+ for (int i = 0; i < numEntries; ++i)
+ addrStack[i] = 0;
+}
+
+void
ReturnAddrStack::push(const Addr &return_addr)
{
incrTos();