diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-02-27 09:21:14 -0800 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-02-27 09:21:14 -0800 |
commit | 932f6440a1269c6ceaf2dc07a9ced8ac4b7b1652 (patch) | |
tree | d8fd1aa417743b58a275bb9fd24fe5debc0088be /src/arch/x86/linux/process.hh | |
parent | bebbc9dc8901d82954988d019d54bf5dee2d1a90 (diff) | |
download | gem5-932f6440a1269c6ceaf2dc07a9ced8ac4b7b1652.tar.xz |
X86: Add a class to support 32 bit x86 linux process.
Diffstat (limited to 'src/arch/x86/linux/process.hh')
-rw-r--r-- | src/arch/x86/linux/process.hh | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/src/arch/x86/linux/process.hh b/src/arch/x86/linux/process.hh index e224374d4..e80b86537 100644 --- a/src/arch/x86/linux/process.hh +++ b/src/arch/x86/linux/process.hh @@ -68,18 +68,40 @@ namespace X86ISA { /// A process with emulated x86/Linux syscalls. class X86LinuxProcess : public X86LiveProcess { + 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); +}; + +class X86_64LinuxProcess : public X86LinuxProcess +{ public: /// Constructor. - X86LinuxProcess(LiveProcessParams * params, ObjectFile *objFile); + X86_64LinuxProcess(LiveProcessParams * params, ObjectFile *objFile); /// Array of syscall descriptors, indexed by call number. static SyscallDesc syscallDescs[]; +}; - SyscallDesc* getDesc(int callnum); - - const int Num_Syscall_Descs; +class I386LinuxProcess : public X86LinuxProcess +{ + public: + /// Constructor. + I386LinuxProcess(LiveProcessParams * params, ObjectFile *objFile); - void handleTrap(int trapNum, ThreadContext *tc); + /// Array of syscall descriptors, indexed by call number. + static SyscallDesc syscallDescs[]; }; } // namespace X86ISA |