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
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user