diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2010-10-15 23:57:06 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2010-10-15 23:57:06 -0700 |
commit | ab9f062166085c9750eeee2318c25efeb2ec5948 (patch) | |
tree | 21cb1f2f3d4ec4d64574516e1335e6697321c07f /src/sim | |
parent | b197a542b4e572d1e2df149642850fb9189c86c7 (diff) | |
download | gem5-ab9f062166085c9750eeee2318c25efeb2ec5948.tar.xz |
GetArgument: Rework getArgument so that X86_FS compiles again.
When no size is specified for an argument, push the decision about what size
to use into the ISA by passing a size of -1.
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/arguments.cc | 2 | ||||
-rw-r--r-- | src/sim/arguments.hh | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/sim/arguments.cc b/src/sim/arguments.cc index 511fc630d..6d45e3b3d 100644 --- a/src/sim/arguments.cc +++ b/src/sim/arguments.cc @@ -50,7 +50,7 @@ Arguments::Data::alloc(size_t size) } uint64_t -Arguments::getArg(uint8_t size, bool fp) +Arguments::getArg(uint16_t size, bool fp) { return TheISA::getArgument(tc, number, size, fp); } diff --git a/src/sim/arguments.hh b/src/sim/arguments.hh index 97b848e03..ef94cbb25 100644 --- a/src/sim/arguments.hh +++ b/src/sim/arguments.hh @@ -45,7 +45,7 @@ class Arguments protected: ThreadContext *tc; int number; - uint64_t getArg(uint8_t size, bool fp = false); + uint64_t getArg(uint16_t size = (uint16_t)(-1), bool fp = false); protected: class Data : public RefCounted @@ -82,7 +82,7 @@ class Arguments // for checking if an argument is NULL bool operator!() { - return getArg(TheISA::MachineBytes) == 0; + return getArg() == 0; } Arguments &operator++() { @@ -143,7 +143,7 @@ class Arguments operator char *() { char *buf = data->alloc(2048); - CopyStringOut(tc, buf, getArg(TheISA::MachineBytes), 2048); + CopyStringOut(tc, buf, getArg(), 2048); return buf; } }; |