diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2007-08-01 16:59:14 -0400 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2007-08-01 16:59:14 -0400 |
commit | fae60c164e284864cfabea515db6ba28d601b71d (patch) | |
tree | 46f81cfc7e8df85101fe2efeb020dc4be5d47874 /src/kern/linux | |
parent | ae3e1d22fc3bfff8c246a0a743b77f4096d95b74 (diff) | |
download | gem5-fae60c164e284864cfabea515db6ba28d601b71d.tar.xz |
Arguments: Get rid of duplicate code for the Arguments class in each architecture.
Move the argument files to src/sim and add a utility.cc file with a function
getArguments() that returns the given argument in the architecture specific fashion.
getArguments() was getArg() is the architecture specific Argument class and has had
all magic numbers replaced with meaningful constants. Also add a function to the
Argument class for testing if an argument is NULL.
--HG--
rename : src/arch/alpha/arguments.cc => src/sim/arguments.cc
rename : src/arch/alpha/arguments.hh => src/sim/arguments.hh
extra : convert_revision : 8b93667bafaa03b52aadb64d669adfe835266b8e
Diffstat (limited to 'src/kern/linux')
-rw-r--r-- | src/kern/linux/events.cc | 4 | ||||
-rw-r--r-- | src/kern/linux/printk.cc | 4 | ||||
-rw-r--r-- | src/kern/linux/printk.hh | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/kern/linux/events.cc b/src/kern/linux/events.cc index 42fa63a27..bfff816ca 100644 --- a/src/kern/linux/events.cc +++ b/src/kern/linux/events.cc @@ -29,7 +29,7 @@ * Ali Saidi */ -#include "arch/arguments.hh" +#include "sim/arguments.hh" #include "base/trace.hh" #include "cpu/thread_context.hh" #include "kern/linux/events.hh" @@ -46,7 +46,7 @@ DebugPrintkEvent::process(ThreadContext *tc) { if (DTRACE(DebugPrintf)) { std::stringstream ss; - TheISA::Arguments args(tc); + Arguments args(tc); Printk(ss, args); StringWrap name(tc->getSystemPtr()->name() + ".dprintk"); DPRINTFN("%s", ss.str()); diff --git a/src/kern/linux/printk.cc b/src/kern/linux/printk.cc index 866353e31..24e28e666 100644 --- a/src/kern/linux/printk.cc +++ b/src/kern/linux/printk.cc @@ -32,7 +32,7 @@ #include <sys/types.h> #include <algorithm> -#include "arch/arguments.hh" +#include "sim/arguments.hh" #include "base/trace.hh" #include "kern/linux/printk.hh" @@ -40,7 +40,7 @@ using namespace std; void -Printk(stringstream &out, TheISA::Arguments args) +Printk(stringstream &out, Arguments args) { char *p = (char *)args++; diff --git a/src/kern/linux/printk.hh b/src/kern/linux/printk.hh index 20dfb430f..da9564b7e 100644 --- a/src/kern/linux/printk.hh +++ b/src/kern/linux/printk.hh @@ -36,8 +36,8 @@ #include <sstream> -class TheISA::Arguments; +class Arguments; -void Printk(std::stringstream &out, TheISA::Arguments args); +void Printk(std::stringstream &out, Arguments args); #endif // __PRINTK_HH__ |