Don't access init_regs directly. This does not affect newmem; Steve already changed this in newmem.
--HG-- extra : convert_revision : 19b1ed0bb2c8bcde72843e62f73635e84adf95b5
This commit is contained in:
parent
7405a3530b
commit
dc75cf121c
|
@ -148,6 +148,7 @@ Process::registerExecContext(ExecContext *xc)
|
||||||
|
|
||||||
if (myIndex == 0) {
|
if (myIndex == 0) {
|
||||||
// copy process's initial regs struct
|
// copy process's initial regs struct
|
||||||
|
// Hack for now to copy init regs
|
||||||
xc->copyArchRegs(cpuXC->getProxy());
|
xc->copyArchRegs(cpuXC->getProxy());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -343,12 +344,12 @@ LiveProcess::LiveProcess(const string &nm, ObjectFile *objFile,
|
||||||
copyStringArray(argv, argv_array_base, arg_data_base, memory);
|
copyStringArray(argv, argv_array_base, arg_data_base, memory);
|
||||||
copyStringArray(envp, envp_array_base, env_data_base, memory);
|
copyStringArray(envp, envp_array_base, env_data_base, memory);
|
||||||
|
|
||||||
init_regs->intRegFile[ArgumentReg0] = argc;
|
cpuXC->setIntReg(ArgumentReg0, argc);
|
||||||
init_regs->intRegFile[ArgumentReg1] = argv_array_base;
|
cpuXC->setIntReg(ArgumentReg1, argv_array_base);
|
||||||
init_regs->intRegFile[StackPointerReg] = stack_min;
|
cpuXC->setIntReg(StackPointerReg, stack_min);
|
||||||
init_regs->intRegFile[GlobalPointerReg] = objFile->globalPointer();
|
cpuXC->setIntReg(GlobalPointerReg, objFile->globalPointer());
|
||||||
init_regs->pc = prog_entry;
|
cpuXC->setPC(prog_entry);
|
||||||
init_regs->npc = prog_entry + sizeof(MachInst);
|
cpuXC->setNextPC(prog_entry + sizeof(MachInst));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue