From 2c5e03550adcd1348cc1d6f3c00af77cbf99c5ce Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sun, 12 Feb 2006 12:40:58 -0500 Subject: [PATCH] Removed isa_traits.hh from targetarch, moved vptr.hh from arch/alpha to sim, fixed an include to have the new location, and removed an ambiguating function declaration in byteswap.hh. SConscript: Moved isa_fullsys_traits.hh out of targetarch, since the only place it's included, and the only place the comments in the file say it should be included, is in the alpha isa_traits.hh targetarch/isa_traits.hh is now included through arch/isa_traits.hh vptr.hh was removed from targetarch, and moved to sim arch/alpha/pseudo_inst.cc: Moved vptr.hh from targetarch to sim base/loader/object_file.hh: base/loader/symtab.hh: cpu/base.hh: dev/ide_disk.cc: Changed the include of isa_traits.hh from targetarch to arch cpu/static_inst.hh: dev/platform.hh: dev/simple_disk.hh: kern/tru64/dump_mbuf.cc: kern/tru64/mbuf.hh: kern/tru64/tru64_events.cc: kern/tru64/tru64_system.cc: kern/tru64/tru64_system.hh: sim/process.hh: sim/syscall_emul.hh: Changed the include of isa_traits.hh from targetarch to arch. kern/linux/linux_threadinfo.hh: Changed the include of vptr.hh from targetarch to sim. sim/byteswap.hh: Removed the line declaring swap_byte(long), since it ambiguates with swap_byte(int32_t) sim/vptr.hh: Fixed the assert in the equals operator. Changed the AlphaISA namespace reference to TheISA. Changed arch/alpha/vtophys.hh to targetarch/vtophys.hh, since this file is now for all architectures. Added an include of arch/isa_traits.hh so that TheISA would be defined. --HG-- extra : convert_revision : e3c6ac17ed0277cfeba1d35cd63eba66eba5996f --- SConscript | 6 +++--- arch/alpha/pseudo_inst.cc | 2 +- base/loader/object_file.hh | 2 +- base/loader/symtab.hh | 2 +- cpu/base.hh | 2 +- cpu/static_inst.hh | 2 +- dev/ide_disk.cc | 2 +- dev/platform.hh | 2 +- dev/simple_disk.hh | 2 +- kern/linux/linux_threadinfo.hh | 2 +- kern/tru64/dump_mbuf.cc | 2 +- kern/tru64/mbuf.hh | 2 +- kern/tru64/tru64_events.cc | 2 +- kern/tru64/tru64_system.cc | 2 +- kern/tru64/tru64_system.hh | 2 +- sim/byteswap.hh | 1 - sim/process.hh | 2 +- sim/syscall_emul.hh | 2 +- sim/vptr.hh | 10 ++++++---- 19 files changed, 25 insertions(+), 24 deletions(-) diff --git a/SConscript b/SConscript index 589b2a17c..0206141fc 100644 --- a/SConscript +++ b/SConscript @@ -347,16 +347,16 @@ targetarch_files = Split(''' ecoff_machdep.h ev5.hh faults.hh - isa_fullsys_traits.hh - isa_traits.hh pseudo_inst.hh stacktrace.hh - vptr.hh vtophys.hh ''') +# isa_traits.hh # osfpal.hh # byte_swap.hh # alpha_common_syscall_emul.hh +# vptr.hh +# isa_fullsys_traits.hh # Set up bridging headers to the architecture specific versions for f in targetarch_files: diff --git a/arch/alpha/pseudo_inst.cc b/arch/alpha/pseudo_inst.cc index e105b3cc8..d6f622ba2 100644 --- a/arch/alpha/pseudo_inst.cc +++ b/arch/alpha/pseudo_inst.cc @@ -46,7 +46,7 @@ #include "sim/stats.hh" #include "sim/system.hh" #include "sim/debug.hh" -#include "targetarch/vptr.hh" +#include "sim/vptr.hh" using namespace std; diff --git a/base/loader/object_file.hh b/base/loader/object_file.hh index 26d3ef3b0..3c8659e18 100644 --- a/base/loader/object_file.hh +++ b/base/loader/object_file.hh @@ -29,7 +29,7 @@ #ifndef __OBJECT_FILE_HH__ #define __OBJECT_FILE_HH__ -#include "targetarch/isa_traits.hh" // for Addr +#include "arch/isa_traits.hh" // for Addr class FunctionalMemory; class SymbolTable; diff --git a/base/loader/symtab.hh b/base/loader/symtab.hh index 324fd8b45..ebcda1345 100644 --- a/base/loader/symtab.hh +++ b/base/loader/symtab.hh @@ -32,7 +32,7 @@ #include #include -#include "targetarch/isa_traits.hh" // for Addr +#include "arch/isa_traits.hh" // for Addr class Checkpoint; class SymbolTable diff --git a/cpu/base.hh b/cpu/base.hh index 4a44ab804..2bd1210d8 100644 --- a/cpu/base.hh +++ b/cpu/base.hh @@ -36,7 +36,7 @@ #include "cpu/sampler/sampler.hh" #include "sim/eventq.hh" #include "sim/sim_object.hh" -#include "targetarch/isa_traits.hh" +#include "arch/isa_traits.hh" #if FULL_SYSTEM class System; diff --git a/cpu/static_inst.hh b/cpu/static_inst.hh index 85cfb5ae7..24997eadc 100644 --- a/cpu/static_inst.hh +++ b/cpu/static_inst.hh @@ -36,7 +36,7 @@ #include "base/refcnt.hh" #include "encumbered/cpu/full/op_class.hh" #include "sim/host.hh" -#include "targetarch/isa_traits.hh" +#include "arch/isa_traits.hh" // forward declarations struct AlphaSimpleImpl; diff --git a/dev/ide_disk.cc b/dev/ide_disk.cc index ea8f151c0..9d8bb8825 100644 --- a/dev/ide_disk.cc +++ b/dev/ide_disk.cc @@ -50,7 +50,7 @@ #include "sim/builder.hh" #include "sim/sim_object.hh" #include "sim/root.hh" -#include "targetarch/isa_traits.hh" +#include "arch/isa_traits.hh" using namespace std; diff --git a/dev/platform.hh b/dev/platform.hh index ee9c72617..1ee645454 100644 --- a/dev/platform.hh +++ b/dev/platform.hh @@ -35,7 +35,7 @@ #define __DEV_PLATFORM_HH__ #include "sim/sim_object.hh" -#include "targetarch/isa_traits.hh" +#include "arch/isa_traits.hh" class PciConfigAll; class IntrControl; diff --git a/dev/simple_disk.hh b/dev/simple_disk.hh index 006155168..6560e15c2 100644 --- a/dev/simple_disk.hh +++ b/dev/simple_disk.hh @@ -34,7 +34,7 @@ #define __DEV_SIMPLE_DISK_HH__ #include "sim/sim_object.hh" -#include "targetarch/isa_traits.hh" +#include "arch/isa_traits.hh" class DiskImage; class PhysicalMemory; diff --git a/kern/linux/linux_threadinfo.hh b/kern/linux/linux_threadinfo.hh index 0c60b9f5c..9bab1dc49 100644 --- a/kern/linux/linux_threadinfo.hh +++ b/kern/linux/linux_threadinfo.hh @@ -31,7 +31,7 @@ #include "kern/linux/thread_info.hh" #include "kern/linux/sched.hh" -#include "targetarch/vptr.hh" +#include "sim/vptr.hh" namespace Linux { diff --git a/kern/tru64/dump_mbuf.cc b/kern/tru64/dump_mbuf.cc index 215930923..85cb4de96 100644 --- a/kern/tru64/dump_mbuf.cc +++ b/kern/tru64/dump_mbuf.cc @@ -35,7 +35,7 @@ #include "kern/tru64/mbuf.hh" #include "sim/host.hh" #include "targetarch/arguments.hh" -#include "targetarch/isa_traits.hh" +#include "arch/isa_traits.hh" #include "targetarch/vtophys.hh" namespace tru64 { diff --git a/kern/tru64/mbuf.hh b/kern/tru64/mbuf.hh index f89074653..93424858f 100644 --- a/kern/tru64/mbuf.hh +++ b/kern/tru64/mbuf.hh @@ -30,7 +30,7 @@ #define __MBUF_HH__ #include "sim/host.hh" -#include "targetarch/isa_traits.hh" +#include "arch/isa_traits.hh" namespace tru64 { diff --git a/kern/tru64/tru64_events.cc b/kern/tru64/tru64_events.cc index 2079922b7..d769aab0f 100644 --- a/kern/tru64/tru64_events.cc +++ b/kern/tru64/tru64_events.cc @@ -34,7 +34,7 @@ #include "kern/tru64/printf.hh" #include "mem/functional/memory_control.hh" #include "targetarch/arguments.hh" -#include "targetarch/isa_traits.hh" +#include "arch/isa_traits.hh" //void SkipFuncEvent::process(ExecContext *xc); diff --git a/kern/tru64/tru64_system.cc b/kern/tru64/tru64_system.cc index f65293474..ebcdc1553 100644 --- a/kern/tru64/tru64_system.cc +++ b/kern/tru64/tru64_system.cc @@ -36,7 +36,7 @@ #include "mem/functional/memory_control.hh" #include "mem/functional/physical.hh" #include "sim/builder.hh" -#include "targetarch/isa_traits.hh" +#include "arch/isa_traits.hh" #include "targetarch/vtophys.hh" using namespace std; diff --git a/kern/tru64/tru64_system.hh b/kern/tru64/tru64_system.hh index a9077e112..d4eb5a59a 100644 --- a/kern/tru64/tru64_system.hh +++ b/kern/tru64/tru64_system.hh @@ -30,7 +30,7 @@ #define __KERN_TRU64_TRU64_SYSTEM_HH__ #include "sim/system.hh" -#include "targetarch/isa_traits.hh" +#include "arch/isa_traits.hh" class ExecContext; diff --git a/sim/byteswap.hh b/sim/byteswap.hh index 6a98a987f..c8e3694fe 100644 --- a/sim/byteswap.hh +++ b/sim/byteswap.hh @@ -79,7 +79,6 @@ static inline uint64_t swap_byte(uint64_t x) {return swap_byte64(x);} static inline int64_t swap_byte(int64_t x) {return swap_byte64((uint64_t)x);} static inline uint32_t swap_byte(uint32_t x) {return swap_byte32(x);} static inline int32_t swap_byte(int32_t x) {return swap_byte32((uint32_t)x);} -static inline int32_t swap_byte(long x) {return swap_byte32((long)x);} static inline uint16_t swap_byte(uint16_t x) {return swap_byte32(x);} static inline int16_t swap_byte(int16_t x) {return swap_byte16((uint16_t)x);} static inline uint8_t swap_byte(uint8_t x) {return x;} diff --git a/sim/process.hh b/sim/process.hh index 2116ef632..43fafd9d7 100644 --- a/sim/process.hh +++ b/sim/process.hh @@ -40,7 +40,7 @@ #include -#include "targetarch/isa_traits.hh" +#include "arch/isa_traits.hh" #include "sim/sim_object.hh" #include "sim/stats.hh" #include "base/statistics.hh" diff --git a/sim/syscall_emul.hh b/sim/syscall_emul.hh index f55709575..4e247ed55 100644 --- a/sim/syscall_emul.hh +++ b/sim/syscall_emul.hh @@ -47,7 +47,7 @@ #include "base/intmath.hh" // for RoundUp #include "mem/functional/functional.hh" -#include "targetarch/isa_traits.hh" // for Addr +#include "arch/isa_traits.hh" // for Addr #include "base/trace.hh" #include "cpu/exec_context.hh" diff --git a/sim/vptr.hh b/sim/vptr.hh index d1bda4061..7ec43602d 100644 --- a/sim/vptr.hh +++ b/sim/vptr.hh @@ -29,7 +29,8 @@ #ifndef __ARCH_ALPHA_VPTR_HH__ #define __ARCH_ALPHA_VPTR_HH__ -#include "arch/alpha/vtophys.hh" +#include "targetarch/vtophys.hh" +#include "arch/isa_traits.hh" class ExecContext; @@ -69,15 +70,16 @@ class VPtr const VPtr &operator+=(int offset) { ptr += offset; - assert((ptr & (AlphaISA::PageBytes - 1)) + sizeof(T) - < AlphaISA::PageBytes); + assert((ptr & (TheISA::PageBytes - 1)) + sizeof(T) + < TheISA::PageBytes); return *this; } const VPtr &operator=(Addr p) { - assert((p & (AlphaISA::PageBytes)) + sizeof(T) < AlphaISA::PageBytes); + assert((p & (TheISA::PageBytes - 1)) + sizeof(T) + < TheISA::PageBytes); ptr = p; return *this;