summaryrefslogtreecommitdiff
path: root/src/arch/x86
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/x86
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/x86')
-rw-r--r--src/arch/x86/stacktrace.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/arch/x86/stacktrace.cc b/src/arch/x86/stacktrace.cc
index 2d9eaea73..b5fbb5ce5 100644
--- a/src/arch/x86/stacktrace.cc
+++ b/src/arch/x86/stacktrace.cc
@@ -104,7 +104,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";
@@ -164,8 +164,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)) {
@@ -176,7 +175,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) {
// panic("no return address value pc=%#x\n", pc);
return false;