summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2004-03-24 23:29:10 -0800
committerSteve Reinhardt <stever@eecs.umich.edu>2004-03-24 23:29:10 -0800
commitaeb8e8ccb7d9a69e44c3943a5e82b6e58e7082f3 (patch)
tree234828776c4def1dd4a9bb783b52c4a49f9b6205 /cpu
parent97c11561ff75a9b0d1df14f628c0a398d2e00854 (diff)
downloadgem5-aeb8e8ccb7d9a69e44c3943a5e82b6e58e7082f3.tar.xz
Minor cleanup from building & diffing behavior
on various platforms. base/hashmap.hh: gcc on Alpha doesn't always define __LP64__, even though it arguably should. cpu/exec_context.cc: Clear register file on non-full-system too (even though it typically gets overwritten by the initial regs from the Process object). sim/process.cc: Clear initial register copy in Process object. Not all regs get initialized when the executable is loaded. --HG-- extra : convert_revision : f1fe4734a5ea81331d70994cb5284b1e9db0dceb
Diffstat (limited to 'cpu')
-rw-r--r--cpu/exec_context.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/cpu/exec_context.cc b/cpu/exec_context.cc
index eedd8b8a8..e7d3e0b91 100644
--- a/cpu/exec_context.cc
+++ b/cpu/exec_context.cc
@@ -60,6 +60,7 @@ ExecContext::ExecContext(BaseCPU *_cpu, int _thread_num,
process(_process), mem(process->getMemory()), asid(_asid),
func_exe_inst(0), storeCondFailures(0)
{
+ memset(&regs, 0, sizeof(RegFile));
}
ExecContext::ExecContext(BaseCPU *_cpu, int _thread_num,
@@ -67,6 +68,7 @@ ExecContext::ExecContext(BaseCPU *_cpu, int _thread_num,
: cpu(_cpu), thread_num(_thread_num), process(0), mem(_mem), asid(_asid),
func_exe_inst(0), storeCondFailures(0)
{
+ memset(&regs, 0, sizeof(RegFile));
}
#endif