diff options
-rw-r--r-- | base/hashmap.hh | 2 | ||||
-rw-r--r-- | cpu/exec_context.cc | 2 | ||||
-rw-r--r-- | sim/process.cc | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/base/hashmap.hh b/base/hashmap.hh index 995e98a90..59c1fe3aa 100644 --- a/base/hashmap.hh +++ b/base/hashmap.hh @@ -57,7 +57,7 @@ namespace m5 { // namespace __hash_namespace { -#if !defined(__LP64__) +#if !defined(__LP64__) && !defined(__alpha__) template<> struct hash<uint64_t> { size_t operator()(uint64_t r) const { 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(®s, 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(®s, 0, sizeof(RegFile)); } #endif diff --git a/sim/process.cc b/sim/process.cc index c5eee4527..28d59e22c 100644 --- a/sim/process.cc +++ b/sim/process.cc @@ -75,6 +75,7 @@ Process::Process(const string &name, // allocate initial register file init_regs = new RegFile; + memset(init_regs, 0, sizeof(RegFile)); // initialize first 3 fds (stdin, stdout, stderr) fd_map[STDIN_FILENO] = stdin_fd; |