diff options
author | Gabe Black <gabeblack@google.com> | 2019-05-01 21:43:09 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2019-05-30 06:07:33 +0000 |
commit | 096598c05a6c352bfd4b93adf06143a43a8f4e11 (patch) | |
tree | 1dcbf980d846035fed6554ae00ca1d2669072b51 /src/sim/arguments.hh | |
parent | da7e63d088cd1710ee4f55f7c5481df4fa95e531 (diff) | |
download | gem5-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/sim/arguments.hh')
-rw-r--r-- | src/sim/arguments.hh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/sim/arguments.hh b/src/sim/arguments.hh index 498527ca2..977e3ffc0 100644 --- a/src/sim/arguments.hh +++ b/src/sim/arguments.hh @@ -34,10 +34,9 @@ #include <cassert> #include <memory> +#include "cpu/thread_context.hh" #include "mem/fs_translating_port_proxy.hh" -class ThreadContext; - class Arguments { protected: @@ -137,13 +136,13 @@ class Arguments template <class T> operator T *() { T *buf = (T *)data->alloc(sizeof(T)); - CopyOut(tc, buf, getArg(sizeof(T)), sizeof(T)); + tc->getVirtProxy().readBlob(getArg(sizeof(T)), buf, sizeof(T)); return buf; } operator char *() { char *buf = data->alloc(2048); - CopyStringOut(tc, buf, getArg(), 2048); + tc->getVirtProxy().readString(buf, getArg(), 2048); return buf; } }; |