summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/SConscript4
-rw-r--r--src/sim/process.cc14
-rw-r--r--src/sim/process.hh11
-rw-r--r--src/sim/process_impl.hh12
-rw-r--r--src/sim/syscall_emul.hh1
5 files changed, 7 insertions, 35 deletions
diff --git a/src/sim/SConscript b/src/sim/SConscript
index 041c3ac10..d9d8ded24 100644
--- a/src/sim/SConscript
+++ b/src/sim/SConscript
@@ -48,8 +48,10 @@ Source('simulate.cc')
Source('stat_control.cc')
if env['TARGET_ISA'] != 'no':
+ SimObject('Process.py')
SimObject('System.py')
Source('faults.cc')
+ Source('process.cc')
Source('pseudo_inst.cc')
Source('system.cc')
@@ -57,9 +59,7 @@ if env['FULL_SYSTEM']:
Source('arguments.cc')
elif env['TARGET_ISA'] != 'no':
Source('tlb.cc')
- SimObject('Process.py')
- Source('process.cc')
Source('syscall_emul.cc')
DebugFlag('Checkpoint')
diff --git a/src/sim/process.cc b/src/sim/process.cc
index 62b9b7002..f28b1f1ca 100644
--- a/src/sim/process.cc
+++ b/src/sim/process.cc
@@ -77,15 +77,6 @@
using namespace std;
using namespace TheISA;
-//
-// The purpose of this code is to fake the loader & syscall mechanism
-// when there's no OS: thus there's no resone to use it in FULL_SYSTEM
-// mode when we do have an OS
-//
-#if FULL_SYSTEM
-#error "process.cc not compatible with FULL_SYSTEM"
-#endif
-
// current number of allocated processes
int num_processes = 0;
@@ -579,6 +570,7 @@ LiveProcess::LiveProcess(LiveProcessParams * params, ObjectFile *_objFile)
void
LiveProcess::syscall(int64_t callnum, ThreadContext *tc)
{
+#if !FULL_SYSTEM
num_syscalls++;
SyscallDesc *desc = getDesc(callnum);
@@ -586,6 +578,7 @@ LiveProcess::syscall(int64_t callnum, ThreadContext *tc)
fatal("Syscall %d out of range", callnum);
desc->doSyscall(callnum, this, tc);
+#endif
}
IntReg
@@ -611,6 +604,7 @@ LiveProcess::create(LiveProcessParams * params)
"executables are supported!\n Please recompile your "
"executable as a static binary and try again.\n");
+#if !FULL_SYSTEM
#if THE_ISA == ALPHA_ISA
if (objFile->getArch() != ObjectFile::Alpha)
fatal("Object file architecture does not match compiled ISA (Alpha).");
@@ -721,7 +715,7 @@ LiveProcess::create(LiveProcessParams * params)
#else
#error "THE_ISA not set"
#endif
-
+#endif
if (process == NULL)
fatal("Unknown error creating process object.");
diff --git a/src/sim/process.hh b/src/sim/process.hh
index d48b1b463..82879c0e6 100644
--- a/src/sim/process.hh
+++ b/src/sim/process.hh
@@ -32,15 +32,6 @@
#ifndef __PROCESS_HH__
#define __PROCESS_HH__
-//
-// The purpose of this code is to fake the loader & syscall mechanism
-// when there's no OS: thus there's no reason to use it in FULL_SYSTEM
-// mode when we do have an OS.
-//
-#include "config/full_system.hh"
-
-#if !FULL_SYSTEM
-
#include <string>
#include <vector>
@@ -317,6 +308,4 @@ class LiveProcess : public Process
};
-#endif // !FULL_SYSTEM
-
#endif // __PROCESS_HH__
diff --git a/src/sim/process_impl.hh b/src/sim/process_impl.hh
index b5333858c..944c55ec0 100644
--- a/src/sim/process_impl.hh
+++ b/src/sim/process_impl.hh
@@ -32,15 +32,6 @@
#ifndef __SIM_PROCESS_IMPL_HH__
#define __SIM_PROCESS_IMPL_HH__
-//
-// The purpose of this code is to fake the loader & syscall mechanism
-// when there's no OS: thus there's no reason to use it in FULL_SYSTEM
-// mode when we do have an OS.
-//
-#include "config/full_system.hh"
-
-#if !FULL_SYSTEM
-
#include <string>
#include <vector>
@@ -69,7 +60,4 @@ copyStringArray(std::vector<std::string> &strings,
memPort->writeBlob(array_ptr, (uint8_t*)&data_ptr, sizeof(AddrType));
}
-
-#endif // !FULL_SYSTEM
-
#endif
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index d119adc24..aff66ae9c 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -65,6 +65,7 @@
#include "mem/translating_port.hh"
#include "sim/byteswap.hh"
#include "sim/process.hh"
+#include "sim/syscallreturn.hh"
#include "sim/system.hh"
///