summaryrefslogtreecommitdiff
path: root/src/arch/mips
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-05-01 21:43:09 -0700
committerGabe Black <gabeblack@google.com>2019-05-30 06:07:33 +0000
commit096598c05a6c352bfd4b93adf06143a43a8f4e11 (patch)
tree1dcbf980d846035fed6554ae00ca1d2669072b51 /src/arch/mips
parentda7e63d088cd1710ee4f55f7c5481df4fa95e531 (diff)
downloadgem5-096598c05a6c352bfd4b93adf06143a43a8f4e11.tar.xz
arch, base, sim: Replace Copy(String)?(In|Out) with equivalent code.
This expands those functions into code which extracts the virt proxy and then uses the appropriate method on it. This has two benefits. First, the Copy* functions where mostly redundant wrappers around the methods the proxy port already had. Second, using them forced a particular port which might not actually be what the user wanted. Change-Id: I62084631dd080061e3c74997125164f40da2d77c Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18575 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/arch/mips')
-rw-r--r--src/arch/mips/stacktrace.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/arch/mips/stacktrace.cc b/src/arch/mips/stacktrace.cc
index da492f12f..7517b9d0b 100644
--- a/src/arch/mips/stacktrace.cc
+++ b/src/arch/mips/stacktrace.cc
@@ -84,7 +84,7 @@ ProcessInfo::name(Addr ksp) const
return "console";
char comm[256];
- CopyStringOut(tc, comm, task + name_off, sizeof(comm));
+ tc->getVirtProxy().readString(comm, task + name_off, sizeof(comm));
if (!comm[0])
return "startup";
@@ -202,8 +202,7 @@ StackTrace::decodePrologue(Addr sp, Addr callpc, Addr func,
ra = 0;
for (Addr pc = func; pc < callpc; pc += sizeof(MachInst)) {
- MachInst inst;
- CopyOut(tc, (uint8_t *)&inst, pc, sizeof(MachInst));
+ MachInst inst = tc->getVirtProxy().read<MachInst>(pc);
int reg, disp;
if (decodeStack(inst, disp)) {
@@ -213,7 +212,7 @@ StackTrace::decodePrologue(Addr sp, Addr callpc, Addr func,
size += disp;
} else if (decodeSave(inst, reg, disp)) {
if (!ra && reg == ReturnAddressReg) {
- CopyOut(tc, (uint8_t *)&ra, sp + disp, sizeof(Addr));
+ ra = tc->getVirtProxy().read<Addr>(sp + disp);
if (!ra) {
return false;
}