Removed isa_traits.hh from targetarch, moved vptr.hh from arch/alpha to sim, fixed...
authorGabe Black <gblack@eecs.umich.edu>
Sun, 12 Feb 2006 17:40:58 +0000 (12:40 -0500)
committerGabe Black <gblack@eecs.umich.edu>
Sun, 12 Feb 2006 17:40:58 +0000 (12:40 -0500)
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

19 files changed:
SConscript
arch/alpha/pseudo_inst.cc
base/loader/object_file.hh
base/loader/symtab.hh
cpu/base.hh
cpu/static_inst.hh
dev/ide_disk.cc
dev/platform.hh
dev/simple_disk.hh
kern/linux/linux_threadinfo.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/byteswap.hh
sim/process.hh
sim/syscall_emul.hh
sim/vptr.hh

index 589b2a17c105e34e5615441a6015ad5f040dea4d..0206141fc8c7e3db22efe700185f94eb94a366ea 100644 (file)
@@ -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:
index e105b3cc87ffd09666aad5b4ae18ee404ee05ea5..d6f622ba213fb9af400082c7257700d094431b1f 100644 (file)
@@ -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;
 
index 26d3ef3b02f95a9f718209cf0923842029a4f293..3c8659e184dc6bde0efd198856e664111b5dd6a2 100644 (file)
@@ -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;
index 324fd8b45742b04593ecfd28df03624bdb2079e6..ebcda1345c1bf80ad418fa348f0665f750d7f414 100644 (file)
@@ -32,7 +32,7 @@
 #include <iosfwd>
 #include <map>
 
-#include "targetarch/isa_traits.hh"    // for Addr
+#include "arch/isa_traits.hh"  // for Addr
 
 class Checkpoint;
 class SymbolTable
index 4a44ab804ac9e0486cd70c34935df9b9b8894acf..2bd1210d8cc6bba752c1d245a7397822f601324d 100644 (file)
@@ -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;
index 85cfb5ae786c8be1b9b9924ef3515526a46bc984..24997eadc5316d3c84d665e04acda4f9af71fa80 100644 (file)
@@ -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;
index ea8f151c004ea66d3b9c9ad6ee9d983ffd454eb1..9d8bb8825b050ff60a4c103b56a26b86426e2a05 100644 (file)
@@ -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;
 
index ee9c72617e0f3a9a933cfc722541c846ff61e2e3..1ee64545467ef08fd3daa18d24a9d5b59f57b366 100644 (file)
@@ -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;
index 006155168dbdf5bb53b1200f86e5da948f9b6c05..6560e15c21f54f615868b4eb350bc3182bcb4ba0 100644 (file)
@@ -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;
index 0c60b9f5c80c9fee76e40f7d154c7c2f37607eea..9bab1dc49e99ad8f1f4c61bbc426c5888e98bf57 100644 (file)
@@ -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 {
 
index 2159309232ccd887acf092382c06aac289debda6..85cb4de9612d7bf30dcd460391cbcbe5750fbf2a 100644 (file)
@@ -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 {
index f890746537484e16eeb5889ea42c5ab5845e3ee9..93424858f2abeae88df73779681d7b15bc2abb30 100644 (file)
@@ -30,7 +30,7 @@
 #define __MBUF_HH__
 
 #include "sim/host.hh"
-#include "targetarch/isa_traits.hh"
+#include "arch/isa_traits.hh"
 
 namespace tru64 {
 
index 2079922b76b092ebe820bfbc35a233277ccf7361..d769aab0f3d575683a6b2451dffcbb8e96debb3e 100644 (file)
@@ -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);
 
index f65293474b660ecf67c77ea901a6c22a97411076..ebcdc15532cc8d684ee6b3b10e4ef5864d938e50 100644 (file)
@@ -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;
index a9077e112c7cb89a53e4801b1b40d8e8dd7b3ef8..d4eb5a59a2363eecd7be694816468e2b44437261 100644 (file)
@@ -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;
 
index 6a98a987f5c5a9105c74a1a632f39196dc80b669..c8e3694fe1a257b663d311e38bc7b9e86585b3ee 100644 (file)
@@ -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;}
index 2116ef6322e2cbd15502a5aa24241600cf5dc310..43fafd9d7b4d29914eb05326ef08766da8e0f202 100644 (file)
@@ -40,7 +40,7 @@
 
 #include <vector>
 
-#include "targetarch/isa_traits.hh"
+#include "arch/isa_traits.hh"
 #include "sim/sim_object.hh"
 #include "sim/stats.hh"
 #include "base/statistics.hh"
index f55709575bcc2ffa73a15cde43261f87cf8a5be9..4e247ed55ddedb6d5906bd422b0d4ee52b4079c8 100644 (file)
@@ -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"
index d1bda4061a65952709864165d8729e65917329dc..7ec43602d70a95e1bdf6f03ca82e68588421d471 100644 (file)
@@ -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<T> &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<T> &operator=(Addr p)
     {
-        assert((p & (AlphaISA::PageBytes)) + sizeof(T) < AlphaISA::PageBytes);
+        assert((p & (TheISA::PageBytes - 1)) + sizeof(T)
+               < TheISA::PageBytes);
         ptr = p;
 
         return *this;