Pseudoinst: Add an initParam pseudo inst function.

This commit is contained in:
Gabe Black 2011-09-18 23:26:39 -07:00
parent ae62d97158
commit 9eda6b1d88
5 changed files with 10 additions and 4 deletions

View file

@ -985,7 +985,7 @@ decode OPCODE default Unknown::unknown() {
PseudoInst::loadsymbol(xc->tcBase());
}}, No_OpClass, IsNonSpeculative);
0x30: initparam({{
Ra = xc->tcBase()->getCpuPtr()->system->init_param;
Ra = PseudoInst::initParam(xc->tcBase());
}});
#endif
0x40: resetstats({{

View file

@ -203,7 +203,7 @@ let {{
initparamCode = '''
#if FULL_SYSTEM
Rt = xc->tcBase()->getCpuPtr()->system->init_param;
Rt = PseudoInst::initParam(xc->tcBase());
#endif
'''

View file

@ -161,8 +161,7 @@
}}, IsNonSpeculative);
#if FULL_SYSTEM
0x30: m5initparam({{
Rax = xc->tcBase()->getCpuPtr()->
system->init_param;
Rax = PseudoInst::initParam(xc->tcBase());
}}, IsNonSpeculative);
0x31: m5loadsymbol({{
PseudoInst::loadsymbol(xc->tcBase());

View file

@ -260,6 +260,12 @@ addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr)
debugSymbolTable->insert(addr,symbol);
}
uint64_t
initParam(ThreadContext *tc)
{
return tc->getCpuPtr()->system->init_param;
}
#endif

View file

@ -56,6 +56,7 @@ uint64_t readfile(ThreadContext *tc, Addr vaddr, uint64_t len,
uint64_t offset);
void loadsymbol(ThreadContext *xc);
void addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr);
uint64_t initParam(ThreadContext *xc);
#endif
uint64_t rpns(ThreadContext *tc);