summaryrefslogtreecommitdiff
path: root/src/kern
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2007-08-01 16:59:14 -0400
committerAli Saidi <saidi@eecs.umich.edu>2007-08-01 16:59:14 -0400
commitfae60c164e284864cfabea515db6ba28d601b71d (patch)
tree46f81cfc7e8df85101fe2efeb020dc4be5d47874 /src/kern
parentae3e1d22fc3bfff8c246a0a743b77f4096d95b74 (diff)
downloadgem5-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')
-rw-r--r--src/kern/linux/events.cc4
-rw-r--r--src/kern/linux/printk.cc4
-rw-r--r--src/kern/linux/printk.hh4
-rw-r--r--src/kern/tru64/dump_mbuf.cc2
-rw-r--r--src/kern/tru64/dump_mbuf.hh4
-rw-r--r--src/kern/tru64/printf.cc6
-rw-r--r--src/kern/tru64/printf.hh4
-rw-r--r--src/kern/tru64/tru64_events.cc6
8 files changed, 17 insertions, 17 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__
diff --git a/src/kern/tru64/dump_mbuf.cc b/src/kern/tru64/dump_mbuf.cc
index 5ccfbca5d..e6bfc06d9 100644
--- a/src/kern/tru64/dump_mbuf.cc
+++ b/src/kern/tru64/dump_mbuf.cc
@@ -38,7 +38,7 @@
#include "kern/tru64/mbuf.hh"
#include "sim/host.hh"
#include "sim/system.hh"
-#include "arch/arguments.hh"
+#include "sim/arguments.hh"
#include "arch/isa_traits.hh"
#include "arch/vtophys.hh"
diff --git a/src/kern/tru64/dump_mbuf.hh b/src/kern/tru64/dump_mbuf.hh
index 30b1102b9..2f71fc61d 100644
--- a/src/kern/tru64/dump_mbuf.hh
+++ b/src/kern/tru64/dump_mbuf.hh
@@ -31,10 +31,10 @@
#ifndef __DUMP_MBUF_HH__
#define __DUMP_MBUF_HH__
-#include "arch/arguments.hh"
+#include "sim/arguments.hh"
namespace tru64 {
- void DumpMbuf(TheISA::Arguments args);
+ void DumpMbuf(Arguments args);
}
#endif // __DUMP_MBUF_HH__
diff --git a/src/kern/tru64/printf.cc b/src/kern/tru64/printf.cc
index 4245ac6d0..ce77efa83 100644
--- a/src/kern/tru64/printf.cc
+++ b/src/kern/tru64/printf.cc
@@ -31,18 +31,18 @@
#include <sys/types.h>
#include <algorithm>
+#include "arch/vtophys.hh"
#include "base/cprintf.hh"
#include "base/trace.hh"
#include "sim/host.hh"
-#include "arch/arguments.hh"
-#include "arch/vtophys.hh"
+#include "sim/arguments.hh"
using namespace std;
namespace tru64 {
void
-Printf(TheISA::Arguments args)
+Printf(Arguments args)
{
std::ostream &out = Trace::output();
diff --git a/src/kern/tru64/printf.hh b/src/kern/tru64/printf.hh
index ff453b1c1..5036694c0 100644
--- a/src/kern/tru64/printf.hh
+++ b/src/kern/tru64/printf.hh
@@ -31,10 +31,10 @@
#ifndef __PRINTF_HH__
#define __PRINTF_HH__
-#include "arch/arguments.hh"
+#include "sim/arguments.hh"
namespace tru64 {
- void Printf(TheISA::Arguments args);
+ void Printf(Arguments args);
}
#endif // __PRINTF_HH__
diff --git a/src/kern/tru64/tru64_events.cc b/src/kern/tru64/tru64_events.cc
index c84b25dab..c798c3ced 100644
--- a/src/kern/tru64/tru64_events.cc
+++ b/src/kern/tru64/tru64_events.cc
@@ -29,15 +29,15 @@
* Lisa Hsu
*/
+#include "arch/alpha/ev5.hh"
+#include "arch/isa_traits.hh"
#include "cpu/thread_context.hh"
#include "cpu/base.hh"
#include "kern/system_events.hh"
#include "kern/tru64/tru64_events.hh"
#include "kern/tru64/dump_mbuf.hh"
#include "kern/tru64/printf.hh"
-#include "arch/alpha/ev5.hh"
-#include "arch/arguments.hh"
-#include "arch/isa_traits.hh"
+#include "sim/arguments.hh"
#include "sim/system.hh"
using namespace TheISA;