add symbol opcode
--HG-- extra : convert_revision : e050d2c4fec33c41ac21b6f17b3be329b9521429
This commit is contained in:
parent
746841856c
commit
ccae5838fd
|
@ -2727,6 +2727,10 @@ decode OPCODE default Unknown::unknown() {
|
|||
0x52: m5switchcpu({{
|
||||
AlphaPseudo::switchcpu(xc->xcBase());
|
||||
}}, IsNonSpeculative);
|
||||
0x53: m5addsymbol({{
|
||||
AlphaPseudo::addsymbol(xc->xcBase());
|
||||
}}, IsNonSpeculative);
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#include "sim/stats.hh"
|
||||
#include "sim/system.hh"
|
||||
#include "sim/debug.hh"
|
||||
#include "targetarch/vptr.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -132,6 +133,19 @@ namespace AlphaPseudo
|
|||
SetupEvent(Dump, when, repeat);
|
||||
}
|
||||
|
||||
void
|
||||
addsymbol(ExecContext *xc)
|
||||
{
|
||||
Addr addr = xc->regs.intRegFile[16];
|
||||
char symb[100];
|
||||
CopyString(xc, symb, xc->regs.intRegFile[17], 100);
|
||||
std::string symbol(symb);
|
||||
|
||||
DPRINTF(Loader, "Loaded symbol: %s @ %#llx\n", symbol, addr);
|
||||
|
||||
xc->system->kernelSymtab->insert(addr,symbol);
|
||||
}
|
||||
|
||||
void
|
||||
dumpresetstats(ExecContext *xc)
|
||||
{
|
||||
|
|
|
@ -50,4 +50,5 @@ namespace AlphaPseudo
|
|||
void readfile(ExecContext *xc);
|
||||
void debugbreak(ExecContext *xc);
|
||||
void switchcpu(ExecContext *xc);
|
||||
void addsymbol(ExecContext *xc);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue