Pseudoinst: Add an initParam pseudo inst function.
This commit is contained in:
parent
ae62d97158
commit
9eda6b1d88
5 changed files with 10 additions and 4 deletions
|
@ -985,7 +985,7 @@ decode OPCODE default Unknown::unknown() {
|
||||||
PseudoInst::loadsymbol(xc->tcBase());
|
PseudoInst::loadsymbol(xc->tcBase());
|
||||||
}}, No_OpClass, IsNonSpeculative);
|
}}, No_OpClass, IsNonSpeculative);
|
||||||
0x30: initparam({{
|
0x30: initparam({{
|
||||||
Ra = xc->tcBase()->getCpuPtr()->system->init_param;
|
Ra = PseudoInst::initParam(xc->tcBase());
|
||||||
}});
|
}});
|
||||||
#endif
|
#endif
|
||||||
0x40: resetstats({{
|
0x40: resetstats({{
|
||||||
|
|
|
@ -203,7 +203,7 @@ let {{
|
||||||
|
|
||||||
initparamCode = '''
|
initparamCode = '''
|
||||||
#if FULL_SYSTEM
|
#if FULL_SYSTEM
|
||||||
Rt = xc->tcBase()->getCpuPtr()->system->init_param;
|
Rt = PseudoInst::initParam(xc->tcBase());
|
||||||
#endif
|
#endif
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
|
@ -161,8 +161,7 @@
|
||||||
}}, IsNonSpeculative);
|
}}, IsNonSpeculative);
|
||||||
#if FULL_SYSTEM
|
#if FULL_SYSTEM
|
||||||
0x30: m5initparam({{
|
0x30: m5initparam({{
|
||||||
Rax = xc->tcBase()->getCpuPtr()->
|
Rax = PseudoInst::initParam(xc->tcBase());
|
||||||
system->init_param;
|
|
||||||
}}, IsNonSpeculative);
|
}}, IsNonSpeculative);
|
||||||
0x31: m5loadsymbol({{
|
0x31: m5loadsymbol({{
|
||||||
PseudoInst::loadsymbol(xc->tcBase());
|
PseudoInst::loadsymbol(xc->tcBase());
|
||||||
|
|
|
@ -260,6 +260,12 @@ addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr)
|
||||||
debugSymbolTable->insert(addr,symbol);
|
debugSymbolTable->insert(addr,symbol);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint64_t
|
||||||
|
initParam(ThreadContext *tc)
|
||||||
|
{
|
||||||
|
return tc->getCpuPtr()->system->init_param;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,7 @@ uint64_t readfile(ThreadContext *tc, Addr vaddr, uint64_t len,
|
||||||
uint64_t offset);
|
uint64_t offset);
|
||||||
void loadsymbol(ThreadContext *xc);
|
void loadsymbol(ThreadContext *xc);
|
||||||
void addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr);
|
void addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr);
|
||||||
|
uint64_t initParam(ThreadContext *xc);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint64_t rpns(ThreadContext *tc);
|
uint64_t rpns(ThreadContext *tc);
|
||||||
|
|
Loading…
Reference in a new issue