Make targetarch directory in build tree and copy arch/alpha files to it
instead of using symlink. The symlink broke scons's built-in include dependency tacking. Interestingly once it was fixed scons discovered two circular dependency problems which are also fixed now. SConscript: Make targetarch directory in build tree and copy arch/alpha files to it instead of using symlink. The symlink broke scons's built-in include dependency tacking. arch/alpha/ev5.hh: Get rid of circular #include dependence. kern/kernel_stats.cc: Add needed header file. kern/linux/linux_syscalls.hh: kern/tru64/tru64_syscalls.hh: Replace targetarch/syscalls.hh with single template class declaration. --HG-- extra : convert_revision : b8551623c1d441c6eb8d0651387e97e373128814
This commit is contained in:
parent
e9acc88e36
commit
0da150b294
113
SConscript
113
SConscript
|
@ -43,12 +43,12 @@ Import('env')
|
||||||
|
|
||||||
# Base sources used by all configurations.
|
# Base sources used by all configurations.
|
||||||
base_sources = Split('''
|
base_sources = Split('''
|
||||||
arch/alpha/decoder.cc
|
targetarch/decoder.cc
|
||||||
arch/alpha/fast_cpu_exec.cc
|
targetarch/fast_cpu_exec.cc
|
||||||
arch/alpha/simple_cpu_exec.cc
|
targetarch/simple_cpu_exec.cc
|
||||||
arch/alpha/full_cpu_exec.cc
|
targetarch/full_cpu_exec.cc
|
||||||
arch/alpha/faults.cc
|
targetarch/faults.cc
|
||||||
arch/alpha/isa_traits.cc
|
targetarch/isa_traits.cc
|
||||||
|
|
||||||
base/circlebuf.cc
|
base/circlebuf.cc
|
||||||
base/copyright.cc
|
base/copyright.cc
|
||||||
|
@ -237,12 +237,12 @@ mysql_sources = Split('''
|
||||||
|
|
||||||
# Full-system sources
|
# Full-system sources
|
||||||
full_system_sources = Split('''
|
full_system_sources = Split('''
|
||||||
arch/alpha/alpha_memory.cc
|
targetarch/alpha_memory.cc
|
||||||
arch/alpha/arguments.cc
|
targetarch/arguments.cc
|
||||||
arch/alpha/ev5.cc
|
targetarch/ev5.cc
|
||||||
arch/alpha/osfpal.cc
|
targetarch/osfpal.cc
|
||||||
arch/alpha/pseudo_inst.cc
|
targetarch/pseudo_inst.cc
|
||||||
arch/alpha/vtophys.cc
|
targetarch/vtophys.cc
|
||||||
|
|
||||||
base/crc.cc
|
base/crc.cc
|
||||||
base/inet.cc
|
base/inet.cc
|
||||||
|
@ -310,9 +310,9 @@ full_system_sources = Split('''
|
||||||
''')
|
''')
|
||||||
|
|
||||||
full_system_obj_desc_files = Split('''
|
full_system_obj_desc_files = Split('''
|
||||||
arch/alpha/AlphaDTB.od
|
targetarch/AlphaDTB.od
|
||||||
arch/alpha/AlphaITB.od
|
targetarch/AlphaITB.od
|
||||||
arch/alpha/AlphaTLB.od
|
targetarch/AlphaTLB.od
|
||||||
dev/AlphaConsole.od
|
dev/AlphaConsole.od
|
||||||
dev/ConsoleListener.od
|
dev/ConsoleListener.od
|
||||||
dev/CowDiskImage.od
|
dev/CowDiskImage.od
|
||||||
|
@ -349,9 +349,9 @@ full_system_obj_desc_files = Split('''
|
||||||
|
|
||||||
# Syscall emulation (non-full-system) sources
|
# Syscall emulation (non-full-system) sources
|
||||||
syscall_emulation_sources = Split('''
|
syscall_emulation_sources = Split('''
|
||||||
arch/alpha/alpha_common_syscall_emul.cc
|
targetarch/alpha_common_syscall_emul.cc
|
||||||
arch/alpha/alpha_linux_process.cc
|
targetarch/alpha_linux_process.cc
|
||||||
arch/alpha/alpha_tru64_process.cc
|
targetarch/alpha_tru64_process.cc
|
||||||
cpu/memtest/memtest.cc
|
cpu/memtest/memtest.cc
|
||||||
cpu/trace/opt_cpu.cc
|
cpu/trace/opt_cpu.cc
|
||||||
cpu/trace/trace_cpu.cc
|
cpu/trace/trace_cpu.cc
|
||||||
|
@ -369,6 +369,49 @@ syscall_emulation_obj_desc_files = Split('''
|
||||||
sim/Process.od
|
sim/Process.od
|
||||||
''')
|
''')
|
||||||
|
|
||||||
|
targetarch_files = Split('''
|
||||||
|
alpha_common_syscall_emul.cc
|
||||||
|
alpha_common_syscall_emul.hh
|
||||||
|
AlphaDTB.od
|
||||||
|
AlphaITB.od
|
||||||
|
alpha_linux_process.cc
|
||||||
|
alpha_linux_process.hh
|
||||||
|
alpha_memory.cc
|
||||||
|
alpha_memory.hh
|
||||||
|
AlphaTLB.od
|
||||||
|
alpha_tru64_process.cc
|
||||||
|
alpha_tru64_process.hh
|
||||||
|
aout_machdep.h
|
||||||
|
arguments.cc
|
||||||
|
arguments.hh
|
||||||
|
byte_swap.hh
|
||||||
|
ecoff_machdep.h
|
||||||
|
elf_machdep.h
|
||||||
|
ev5.cc
|
||||||
|
ev5.hh
|
||||||
|
faults.cc
|
||||||
|
faults.hh
|
||||||
|
isa_desc
|
||||||
|
isa_fullsys_traits.hh
|
||||||
|
isa_traits.cc
|
||||||
|
isa_traits.hh
|
||||||
|
machine_exo.h
|
||||||
|
osfpal.cc
|
||||||
|
osfpal.hh
|
||||||
|
pmap.h
|
||||||
|
pseudo_inst.cc
|
||||||
|
pseudo_inst.hh
|
||||||
|
PseudoInsts.pd
|
||||||
|
syscalls.hh
|
||||||
|
vptr.hh
|
||||||
|
vtophys.cc
|
||||||
|
vtophys.hh
|
||||||
|
''')
|
||||||
|
|
||||||
|
for f in targetarch_files:
|
||||||
|
env.Command('targetarch/' + f, 'arch/alpha/' + f, 'cp $SOURCE $TARGET')
|
||||||
|
|
||||||
|
|
||||||
# Set up complete list of sources based on configuration.
|
# Set up complete list of sources based on configuration.
|
||||||
sources = base_sources
|
sources = base_sources
|
||||||
obj_desc_files = base_obj_desc_files
|
obj_desc_files = base_obj_desc_files
|
||||||
|
@ -407,30 +450,14 @@ env.Command(Split('base/traceflags.hh base/traceflags.cc'),
|
||||||
'python $SOURCE $TARGET.base')
|
'python $SOURCE $TARGET.base')
|
||||||
|
|
||||||
# several files are generated from arch/$TARGET_ISA/isa_desc.
|
# several files are generated from arch/$TARGET_ISA/isa_desc.
|
||||||
env.Command(Split('''arch/alpha/decoder.cc
|
env.Command(Split('''targetarch/decoder.cc
|
||||||
arch/alpha/decoder.hh
|
targetarch/decoder.hh
|
||||||
arch/alpha/fast_cpu_exec.cc
|
targetarch/fast_cpu_exec.cc
|
||||||
arch/alpha/simple_cpu_exec.cc
|
targetarch/simple_cpu_exec.cc
|
||||||
arch/alpha/full_cpu_exec.cc'''),
|
targetarch/full_cpu_exec.cc'''),
|
||||||
Split('''arch/alpha/isa_desc
|
Split('''targetarch/isa_desc
|
||||||
arch/isa_parser.py'''),
|
arch/isa_parser.py'''),
|
||||||
'$SRCDIR/arch/isa_parser.py $SOURCE $TARGET.dir arch/alpha')
|
'$SRCDIR/arch/isa_parser.py $SOURCE $TARGET.dir targetarch')
|
||||||
|
|
||||||
|
|
||||||
# 'targetarch' is a symlink to arch/$TARGET_ISA.
|
|
||||||
def link_targetarch(target, source, env):
|
|
||||||
link_target = str(target[0])
|
|
||||||
link_source = env.subst('$SRCDIR/arch/$TARGET_ISA')
|
|
||||||
if not os.path.isdir(link_target):
|
|
||||||
print "symlinking", link_source, "to", link_target
|
|
||||||
try:
|
|
||||||
os.symlink(link_source, link_target)
|
|
||||||
except OSError, desc:
|
|
||||||
print "Error creating symlink %s: %s" % (link_target, desc)
|
|
||||||
sys.exit(-1)
|
|
||||||
|
|
||||||
# Tell SCons to use the link_targetarch function to make 'targetarch'
|
|
||||||
env.Command('targetarch', None, link_targetarch)
|
|
||||||
|
|
||||||
|
|
||||||
# libelf build is described in its own SConscript file.
|
# libelf build is described in its own SConscript file.
|
||||||
|
@ -446,11 +473,9 @@ SConscript('sim/pyconfig/SConscript', exports = ['env', 'obj_desc_files'],
|
||||||
# environment, and returns a list of all the corresponding SCons
|
# environment, and returns a list of all the corresponding SCons
|
||||||
# Object nodes (including an extra one for date.cc). We explicitly
|
# Object nodes (including an extra one for date.cc). We explicitly
|
||||||
# add the Object nodes so we can set up special dependencies for
|
# add the Object nodes so we can set up special dependencies for
|
||||||
# targetarch and date.cc.
|
# date.cc.
|
||||||
def make_objs(sources, env):
|
def make_objs(sources, env):
|
||||||
objs = [env.Object(s) for s in sources]
|
objs = [env.Object(s) for s in sources]
|
||||||
# make all objects depend on the targetarch link so it gets made first.
|
|
||||||
env.Depends(objs, 'targetarch')
|
|
||||||
# make date.cc depend on all other objects so it always gets
|
# make date.cc depend on all other objects so it always gets
|
||||||
# recompiled whenever anything else does
|
# recompiled whenever anything else does
|
||||||
date_obj = env.Object('base/date.cc')
|
date_obj = env.Object('base/date.cc')
|
||||||
|
|
|
@ -7,18 +7,6 @@
|
||||||
#error This code is only valid for EV5 systems
|
#error This code is only valid for EV5 systems
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "targetarch/isa_traits.hh"
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
#define MODE2MASK(X) (1 << (X))
|
#define MODE2MASK(X) (1 << (X))
|
||||||
|
|
||||||
// Alpha IPR register accessors
|
// Alpha IPR register accessors
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#include "cpu/static_inst.hh"
|
#include "cpu/static_inst.hh"
|
||||||
#include "kern/kernel_stats.hh"
|
#include "kern/kernel_stats.hh"
|
||||||
#include "kern/linux/linux_syscalls.hh"
|
#include "kern/linux/linux_syscalls.hh"
|
||||||
|
#include "kern/tru64/tru64_syscalls.hh"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace Stats;
|
using namespace Stats;
|
||||||
|
|
|
@ -29,11 +29,14 @@
|
||||||
#ifndef __LINUX_SYSCALLS_HH__
|
#ifndef __LINUX_SYSCALLS_HH__
|
||||||
#define __LINUX_SYSCALLS_HH__
|
#define __LINUX_SYSCALLS_HH__
|
||||||
|
|
||||||
#include "targetarch/syscalls.hh"
|
|
||||||
#include "kern/linux/linux.hh"
|
#include "kern/linux/linux.hh"
|
||||||
|
|
||||||
struct SystemCalls<Linux>
|
template <class OS>
|
||||||
|
class SystemCalls;
|
||||||
|
|
||||||
|
class SystemCalls<Linux>
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
enum {
|
enum {
|
||||||
syscall = 0,
|
syscall = 0,
|
||||||
llseek = 1,
|
llseek = 1,
|
||||||
|
|
|
@ -29,11 +29,14 @@
|
||||||
#ifndef __TRU64_SYSCALLS_HH__
|
#ifndef __TRU64_SYSCALLS_HH__
|
||||||
#define __TRU64_SYSCALLS_HH__
|
#define __TRU64_SYSCALLS_HH__
|
||||||
|
|
||||||
#include "targetarch/syscalls.hh"
|
|
||||||
#include "kern/tru64/tru64.hh"
|
#include "kern/tru64/tru64.hh"
|
||||||
|
|
||||||
struct SystemCalls<Tru64>
|
template <class OS>
|
||||||
|
class SystemCalls;
|
||||||
|
|
||||||
|
class SystemCalls<Tru64>
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
enum {
|
enum {
|
||||||
syscall = 0,
|
syscall = 0,
|
||||||
exit = 1,
|
exit = 1,
|
||||||
|
|
Loading…
Reference in a new issue