fixes for solaris compile
authorAli Saidi <saidi@eecs.umich.edu>
Sat, 21 Apr 2007 23:11:38 +0000 (19:11 -0400)
committerAli Saidi <saidi@eecs.umich.edu>
Sat, 21 Apr 2007 23:11:38 +0000 (19:11 -0400)
--HG--
extra : convert_revision : c82a62a61650e3700d237da917c453e5a9676320

src/arch/alpha/ev5.cc
src/arch/alpha/floatregfile.hh
src/arch/alpha/intregfile.hh
src/base/random.cc
src/cpu/o3/lsq_unit.hh
src/dev/alpha/console.cc

index ec5090eb872fb621a7ba6fe4ac6351f3a4558a1c..86b8fd2d08f4605898500438d4cd3b268b632eb2 100644 (file)
@@ -245,13 +245,13 @@ AlphaISA::MiscRegFile::readIpr(int idx, ThreadContext *tc)
         {
             AlphaISA::PTE &pte = tc->getDTBPtr()->index(!tc->misspeculating());
 
-            retval |= ((u_int64_t)pte.ppn & ULL(0x7ffffff)) << 32;
-            retval |= ((u_int64_t)pte.xre & ULL(0xf)) << 8;
-            retval |= ((u_int64_t)pte.xwe & ULL(0xf)) << 12;
-            retval |= ((u_int64_t)pte.fonr & ULL(0x1)) << 1;
-            retval |= ((u_int64_t)pte.fonw & ULL(0x1))<< 2;
-            retval |= ((u_int64_t)pte.asma & ULL(0x1)) << 4;
-            retval |= ((u_int64_t)pte.asn & ULL(0x7f)) << 57;
+            retval |= ((uint64_t)pte.ppn & ULL(0x7ffffff)) << 32;
+            retval |= ((uint64_t)pte.xre & ULL(0xf)) << 8;
+            retval |= ((uint64_t)pte.xwe & ULL(0xf)) << 12;
+            retval |= ((uint64_t)pte.fonr & ULL(0x1)) << 1;
+            retval |= ((uint64_t)pte.fonw & ULL(0x1))<< 2;
+            retval |= ((uint64_t)pte.asma & ULL(0x1)) << 4;
+            retval |= ((uint64_t)pte.asn & ULL(0x7f)) << 57;
         }
         break;
 
index d289f57857fe9a16e69b80eea05d4deffdcbeb9f..0c5fe17a74d3d6c6ed464d5aceeebeee3bef6678 100644 (file)
@@ -35,7 +35,7 @@
 #include "arch/alpha/isa_traits.hh"
 #include "arch/alpha/types.hh"
 
-#include <string.h>
+#include <cstring>
 #include <iostream>
 
 class Checkpoint;
@@ -61,7 +61,7 @@ namespace AlphaISA
         void unserialize(Checkpoint *cp, const std::string &section);
 
         void clear()
-        { bzero(d, sizeof(d)); }
+        { std::memset(d, 0, sizeof(d)); }
     };
 }
 
index 0d65f69e0d925b344c9eaeee74b4fe52f625c71a..dea160992be49ef9f7e9a65f2fe5e45b59f8c7cc 100644 (file)
@@ -35,7 +35,7 @@
 #include "arch/alpha/types.hh"
 
 #include <iostream>
-#include <strings.h>
+#include <cstring>
 
 class Checkpoint;
 
@@ -71,7 +71,7 @@ namespace AlphaISA
         void unserialize(Checkpoint *cp, const std::string &section);
 
         void clear()
-        { bzero(regs, sizeof(regs)); }
+        { std::memset(regs, 0, sizeof(regs)); }
     };
 }
 
index 5390ceb463fe8c51b62fcf1ec0affa750dac3689..8a2e3c1c0c8a47db4a761abc720c09a393ee1004 100644 (file)
@@ -37,6 +37,7 @@
 #include <cstdlib>
 #include <cmath>
 
+#include "base/fenv.hh"
 #include "base/random.hh"
 
 using namespace std;
@@ -59,7 +60,7 @@ m5round(double r)
 #if defined(__sun)
     double val;
     int oldrnd = m5_fegetround();
-    m5_fesetround(M5_FP_TONEAREST);
+    m5_fesetround(M5_FE_TONEAREST);
     val = rint(r);
     m5_fesetround(oldrnd);
     return val;
index f24de20d9b1f408593fc90c4a8d8008025f57100..cc33e025dfd45d069521a7d7552f13f8eb8897bf 100644 (file)
@@ -33,6 +33,7 @@
 #define __CPU_O3_LSQ_UNIT_HH__
 
 #include <algorithm>
+#include <cstring>
 #include <map>
 #include <queue>
 
@@ -292,7 +293,7 @@ class LSQUnit {
             : inst(NULL), req(NULL), size(0),
               canWB(0), committed(0), completed(0)
         {
-            bzero(data, sizeof(data));
+            std::memset(data, 0, sizeof(data));
         }
 
         /** Constructs a store queue entry for a given instruction. */
@@ -300,7 +301,7 @@ class LSQUnit {
             : inst(_inst), req(NULL), size(0),
               canWB(0), committed(0), completed(0)
         {
-            bzero(data, sizeof(data));
+            std::memset(data, 0, sizeof(data));
         }
 
         /** The store instruction. */
index f077efe6c3a183ee36534f9802bb860c88841473..443f376a543d0bf61db9a0c84482ea643cdb2b6e 100644 (file)
@@ -76,7 +76,7 @@ AlphaConsole::AlphaConsole(Params *p)
     alphaAccess->diskOperation = 0;
     alphaAccess->outputChar = 0;
     alphaAccess->inputChar = 0;
-    bzero(alphaAccess->cpuStack, sizeof(alphaAccess->cpuStack));
+    std::memset(alphaAccess->cpuStack, 0, sizeof(alphaAccess->cpuStack));
 
 }