summaryrefslogtreecommitdiff
path: root/src/arch/x86/linux
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-02-27 09:21:36 -0800
committerGabe Black <gblack@eecs.umich.edu>2009-02-27 09:21:36 -0800
commit05de9f4e2cb0771a8f83dc1888c877852e19f1ad (patch)
tree546b6d465515ea3e125b516c22be99c8774bb9f0 /src/arch/x86/linux
parent932f6440a1269c6ceaf2dc07a9ced8ac4b7b1652 (diff)
downloadgem5-05de9f4e2cb0771a8f83dc1888c877852e19f1ad.tar.xz
X86: Distinguish the width of values on the stack between 32 and 64 bit processes.
Diffstat (limited to 'src/arch/x86/linux')
-rw-r--r--src/arch/x86/linux/process.cc13
-rw-r--r--src/arch/x86/linux/process.hh31
2 files changed, 9 insertions, 35 deletions
diff --git a/src/arch/x86/linux/process.cc b/src/arch/x86/linux/process.cc
index 8a3fc67ee..da22d9851 100644
--- a/src/arch/x86/linux/process.cc
+++ b/src/arch/x86/linux/process.cc
@@ -64,25 +64,16 @@
#include "kern/linux/linux.hh"
#include "sim/process.hh"
-#include "sim/syscall_emul.hh"
using namespace std;
using namespace X86ISA;
-SyscallDesc*
-X86LinuxProcess::getDesc(int callnum)
-{
- if (callnum < 0 || callnum >= Num_Syscall_Descs)
- return NULL;
- return &syscallDescs[callnum];
-}
-
X86_64LinuxProcess::X86_64LinuxProcess(LiveProcessParams * params,
ObjectFile *objFile)
- : X86LinuxProcess(params, objFile, syscallDescs, 273)
+ : X86_64LiveProcess(params, objFile, syscallDescs, 273)
{}
I386LinuxProcess::I386LinuxProcess(LiveProcessParams * params,
ObjectFile *objFile)
- : X86LinuxProcess(params, objFile, syscallDescs, 324)
+ : I386LiveProcess(params, objFile, syscallDescs, 324)
{}
diff --git a/src/arch/x86/linux/process.hh b/src/arch/x86/linux/process.hh
index e80b86537..2f37692e3 100644
--- a/src/arch/x86/linux/process.hh
+++ b/src/arch/x86/linux/process.hh
@@ -65,43 +65,26 @@
namespace X86ISA {
-/// A process with emulated x86/Linux syscalls.
-class X86LinuxProcess : public X86LiveProcess
+class X86_64LinuxProcess : public X86_64LiveProcess
{
protected:
- SyscallDesc *syscallDescs;
-
- const int Num_Syscall_Descs;
-
- /// Constructor.
- X86LinuxProcess(LiveProcessParams * params, ObjectFile *objFile,
- SyscallDesc *_syscallDescs, int numSyscallDescs) :
- X86LiveProcess(params, objFile), syscallDescs(_syscallDescs),
- Num_Syscall_Descs(numSyscallDescs)
- {}
-
- public:
- SyscallDesc* getDesc(int callnum);
-};
+ /// Array of syscall descriptors, indexed by call number.
+ static SyscallDesc syscallDescs[];
-class X86_64LinuxProcess : public X86LinuxProcess
-{
public:
/// Constructor.
X86_64LinuxProcess(LiveProcessParams * params, ObjectFile *objFile);
+};
+class I386LinuxProcess : public I386LiveProcess
+{
+ protected:
/// Array of syscall descriptors, indexed by call number.
static SyscallDesc syscallDescs[];
-};
-class I386LinuxProcess : public X86LinuxProcess
-{
public:
/// Constructor.
I386LinuxProcess(LiveProcessParams * params, ObjectFile *objFile);
-
- /// Array of syscall descriptors, indexed by call number.
- static SyscallDesc syscallDescs[];
};
} // namespace X86ISA