summaryrefslogtreecommitdiff
path: root/src/arch/sparc/linux
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-04-19 04:15:32 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-04-19 04:15:32 -0700
commitca8598147835cc3bf4cb6125b4f32cbd941f1ae7 (patch)
tree66b6a0f9e09c2988a56962dcd0b66a4b80dd35c1 /src/arch/sparc/linux
parentb8333a5155d1231dc1e76762de6ece23ea702d8a (diff)
downloadgem5-ca8598147835cc3bf4cb6125b4f32cbd941f1ae7.tar.xz
SE mode: Make keeping track of the number of syscalls less hacky.
Diffstat (limited to 'src/arch/sparc/linux')
-rw-r--r--src/arch/sparc/linux/process.cc12
-rw-r--r--src/arch/sparc/linux/process.hh6
-rw-r--r--src/arch/sparc/linux/syscalls.cc6
3 files changed, 8 insertions, 16 deletions
diff --git a/src/arch/sparc/linux/process.cc b/src/arch/sparc/linux/process.cc
index 2078c1dce..28aa1e50c 100644
--- a/src/arch/sparc/linux/process.cc
+++ b/src/arch/sparc/linux/process.cc
@@ -60,18 +60,6 @@ SparcLinuxProcess::getDesc32(int callnum)
return &syscall32Descs[callnum];
}
-SparcLinuxProcess::SparcLinuxProcess() :
- Num_Syscall_Descs(284), //sizeof(syscallDescs) / sizeof(SyscallDesc)),
- Num_Syscall32_Descs(299) //sizeof(syscall32Descs) / sizeof(SyscallDesc))
-{
- // The sparc syscall table must be <= 284 entries because that is all there
- // is space for.
- assert(Num_Syscall_Descs <= 284);
- // The sparc 32 bit syscall table bust be <= 299 entries because that is
- // all there is space for.
- assert(Num_Syscall_Descs <= 299);
-}
-
Sparc32LinuxProcess::Sparc32LinuxProcess(LiveProcessParams * params,
ObjectFile *objFile)
: Sparc32LiveProcess(params, objFile)
diff --git a/src/arch/sparc/linux/process.hh b/src/arch/sparc/linux/process.hh
index a76b4b3b2..f3b569168 100644
--- a/src/arch/sparc/linux/process.hh
+++ b/src/arch/sparc/linux/process.hh
@@ -43,8 +43,6 @@ namespace SparcISA {
class SparcLinuxProcess
{
public:
- SparcLinuxProcess();
-
/// Array of syscall descriptors, indexed by call number.
static SyscallDesc syscallDescs[];
@@ -55,8 +53,8 @@ class SparcLinuxProcess
SyscallDesc* getDesc(int callnum);
SyscallDesc* getDesc32(int callnum);
- const int Num_Syscall_Descs;
- const int Num_Syscall32_Descs;
+ static const int Num_Syscall_Descs;
+ static const int Num_Syscall32_Descs;
};
/// A process with emulated SPARC/Linux syscalls.
diff --git a/src/arch/sparc/linux/syscalls.cc b/src/arch/sparc/linux/syscalls.cc
index 8496fca13..d9651c85c 100644
--- a/src/arch/sparc/linux/syscalls.cc
+++ b/src/arch/sparc/linux/syscalls.cc
@@ -390,6 +390,9 @@ SyscallDesc SparcLinuxProcess::syscall32Descs[] = {
/* 299 */ SyscallDesc("unshare", unimplementedFunc)
};
+const int SparcLinuxProcess::Num_Syscall32_Descs =
+ sizeof(SparcLinuxProcess::syscall32Descs) / sizeof(SyscallDesc);
+
SyscallDesc SparcLinuxProcess::syscallDescs[] = {
/* 0 */ SyscallDesc("restart_syscall", unimplementedFunc),
/* 1 */ SyscallDesc("exit", exitFunc),
@@ -677,4 +680,7 @@ SyscallDesc SparcLinuxProcess::syscallDescs[] = {
/* 283 */ SyscallDesc("keyctl", unimplementedFunc)
};
+const int SparcLinuxProcess::Num_Syscall_Descs =
+ sizeof(SparcLinuxProcess::syscallDescs) / sizeof(SyscallDesc);
+
} // namespace SparcISA