diff options
Diffstat (limited to 'arch/alpha')
-rw-r--r-- | arch/alpha/isa_desc | 4 | ||||
-rw-r--r-- | arch/alpha/pseudo_inst.cc | 14 | ||||
-rw-r--r-- | arch/alpha/pseudo_inst.hh | 1 |
3 files changed, 19 insertions, 0 deletions
diff --git a/arch/alpha/isa_desc b/arch/alpha/isa_desc index 34e86c3a7..c998b1a0a 100644 --- a/arch/alpha/isa_desc +++ b/arch/alpha/isa_desc @@ -2727,6 +2727,10 @@ decode OPCODE default Unknown::unknown() { 0x52: m5switchcpu({{ AlphaPseudo::switchcpu(xc->xcBase()); }}, IsNonSpeculative); + 0x53: m5addsymbol({{ + AlphaPseudo::addsymbol(xc->xcBase()); + }}, IsNonSpeculative); + } } #endif diff --git a/arch/alpha/pseudo_inst.cc b/arch/alpha/pseudo_inst.cc index 123ce44c6..e105b3cc8 100644 --- a/arch/alpha/pseudo_inst.cc +++ b/arch/alpha/pseudo_inst.cc @@ -46,6 +46,7 @@ #include "sim/stats.hh" #include "sim/system.hh" #include "sim/debug.hh" +#include "targetarch/vptr.hh" using namespace std; @@ -133,6 +134,19 @@ namespace AlphaPseudo } 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) { if (!doStatisticsInsts) diff --git a/arch/alpha/pseudo_inst.hh b/arch/alpha/pseudo_inst.hh index 22101b7e2..0e7462a56 100644 --- a/arch/alpha/pseudo_inst.hh +++ b/arch/alpha/pseudo_inst.hh @@ -50,4 +50,5 @@ namespace AlphaPseudo void readfile(ExecContext *xc); void debugbreak(ExecContext *xc); void switchcpu(ExecContext *xc); + void addsymbol(ExecContext *xc); } |