minor changes to endian code so that it runs on x86 linux
authorAli Saidi <saidi@eecs.umich.edu>
Wed, 23 Jun 2004 22:39:11 +0000 (18:39 -0400)
committerAli Saidi <saidi@eecs.umich.edu>
Wed, 23 Jun 2004 22:39:11 +0000 (18:39 -0400)
base/intmath.hh:
    only need FloorLog2(size_t) on a mac, so ifdefed for this
dev/alpha_console.cc:
    Actually allocate the alphaAccess struct.

--HG--
extra : convert_revision : 1f50b1a025c8ee728a9f3d2c603ea38347234f54

base/intmath.hh
dev/alpha_console.cc

index fc28eecef0df6f2c4eb1a5ce002537b457a70f74..821514668840560f5fe8234cabfa40cc58a49d7b 100644 (file)
@@ -119,7 +119,8 @@ FloorLog2(int64_t x)
     return FloorLog2((uint64_t)x);
 }
 
-inline int
+#if defined(__APPLE__)
+int
 FloorLog2(size_t x)
 {
     assert(x > 0);
@@ -132,6 +133,7 @@ FloorLog2(size_t x)
         return FloorLog2((uint64_t)x);
 
 }
+#endif
 
 template <class T>
 inline int
index 5c4858ee5978679ddfeedb1e33e6d559d6e77308..e94ca82eae128c1d8bbc9b1f17a91e08bcddf973 100644 (file)
@@ -69,6 +69,7 @@ AlphaConsole::AlphaConsole(const string &name, SimConsole *cons, SimpleDisk *d,
         pioInterface->addAddrRange(addr, addr + size);
     }
 
+    alphaAccess = new AlphaAccess;
     alphaAccess->last_offset = size - 1;
     alphaAccess->kernStart = system->getKernelStart();
     alphaAccess->kernEnd = system->getKernelEnd();